Thread overview
[Issue 296] New: Template constant can not be used as size of static array.
Aug 19, 2006
d-bugmail
Aug 26, 2006
Thomas Kuehne
Sep 19, 2006
d-bugmail
August 19, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=296

           Summary: Template constant can not be used as size of static
                    array.
           Product: D
           Version: 0.164
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P3
         Component: DMD
        AssignedTo: bugzilla@digitalmars.com
        ReportedBy: oskar.linde@gmail.com


template Count() { const Count = 5; }

int[Count!()] x;
// Error: Count!() is used as a type
// can't have associative array key of void


-- 

August 26, 2006
d-bugmail@puremagic.com schrieb am 2006-08-19:
> http://d.puremagic.com/issues/show_bug.cgi?id=296

> template Count() { const Count = 5; }
>
> int[Count!()] x;
> // Error: Count!() is used as a type
> // can't have associative array key of void

Added to DStress as http://dstress.kuehne.cn/compile/t/template_43_A.d http://dstress.kuehne.cn/compile/t/template_43_B.d

Thomas


September 19, 2006
http://d.puremagic.com/issues/show_bug.cgi?id=296


bugzilla@digitalmars.com changed:

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




------- Comment #2 from bugzilla@digitalmars.com  2006-09-19 15:25 -------
Fixed in DMC 0.167.


--