www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 775] New: array literals can't be used as template arguments

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=775

           Summary: array literals can't be used as template arguments
           Product: D
           Version: 0.178
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: thomas-dloop kuehne.cn


Error: expression ["abc2","def"] is not a valid template value argument:
#
# template A(T ...) { }
# mixin A!(["abc2", "def"]);
#

mixin B!(["abc2","def"]) does not match any template declaration:
#
# template B(alias T) {}
# mixin B!(["abc2", "def"]);
#


-- 
Dec 30 2006
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=775





------- Comment #1 from bugzilla digitalmars.com  2006-12-30 19:30 -------
The second mixin, B, is invalid because an array literal is not a symbol nor is
it a type, hence it won't match an alias parameter.


-- 
Dec 30 2006
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=775


thomas-dloop kuehne.cn changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3




------- Comment #2 from thomas-dloop kuehne.cn  2006-12-30 20:08 -------
fixed Deskzilla's standard priority


-- 
Dec 30 2006
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=775


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




------- Comment #3 from bugzilla digitalmars.com  2007-01-03 22:55 -------
Fixed DMD 1.00


-- 
Jan 03 2007
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=775





------- Comment #4 from thomas-dloop kuehne.cn  2007-02-15 03:42 -------
Added to DStress as
http://dstress.kuehne.cn/compile/t/tuple_14_A.d


-- 
Feb 15 2007