[Issue 1316] Can't directly reference members of CTFE struct arrays

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Sep 1 01:01:20 PDT 2007


http://d.puremagic.com/issues/show_bug.cgi?id=1316


bugzilla at digitalmars.com changed:

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




------- Comment #2 from bugzilla at digitalmars.com  2007-09-01 03:01 -------
Variant 1 works fine now.

Regarding Variant 2: the parentheses in (s[0]) are redundant. The parser
interprets them as an attempt at a C-style cast where s[0] then must be a type.

I prefer to leave that in, as it diagnoses attempts to use C-style casts.

To fix the code, just remove the redundant parentheses.


-- 



More information about the Digitalmars-d-bugs mailing list