Thread overview
[Issue 6369] New: alias this doesn't work with initializer
Jul 23, 2011
Kenji Hara
Aug 25, 2011
Walter Bright
July 23, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6369

           Summary: alias this doesn't work with initializer
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: k.hara.pg@gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg@gmail.com> 2011-07-23 06:07:33 PDT ---
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");

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
July 23, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6369


bearophile_hugs@eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs@eml.cc


--- Comment #1 from bearophile_hugs@eml.cc 2011-07-23 06:10:30 PDT ---
(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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
August 25, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6369


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla@digitalmars.com
         Resolution|                            |FIXED


--- Comment #2 from Walter Bright <bugzilla@digitalmars.com> 2011-08-25 15:04:17 PDT ---
https://github.com/D-Programming-Language/dmd/commit/356593e3fff24bdd3e3bfa742dab52740ce1e595

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------