Bug 6369 – alias this doesn't work with initializer

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-07-23T06:07:00Z
Last change time
2011-08-25T15:04:17Z
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2011-07-23T06:07:33Z
D has tuple declaration like follows: TypeTuple!(int, int) f = 10; assert(f[0] == 10); assert(f[1] == 10); But, alias this tuple is not expanded automatically: TypeTuple!(int, string) f = tuple(10, "str"); assert(f[0] == 10); assert(f[1] == "str"); And, built-in tuple also should allow on initializer: TypeTuple!(int, string) f = TypeTuple!(10, "str"); assert(f[0] == 10); assert(f[1] == "str");
Comment #1 by bearophile_hugs — 2011-07-23T06:10:30Z
(In reply to comment #0) > D has tuple declaration like follows: > > TypeTuple!(int, int) f = 10; > assert(f[0] == 10); > assert(f[1] == 10); See bug 6367
Comment #2 by bugzilla — 2011-08-25T15:04:17Z