[Issue 4206] type accepted as enum initializer

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu May 27 19:36:25 PDT 2010


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


Stewart Gordon <smjg at iname.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |smjg at iname.com


--- Comment #1 from Stewart Gordon <smjg at iname.com> 2010-05-27 19:36:23 PDT ---
Strange that you're getting this in 1.056 - I've always understood enums
without {} to be a D2-specific feature.  I certainly can't reproduce under
1.061.

But under 2.046:

----------
alias int myint;
enum var = myint;

pragma(msg, var);
pragma(msg, typeof(var));
----------
int
bz4206.d(5): Error: argument int to typeof is not an expression
void
----------

This should error at line 2 - myint is a type, not a value.

But I wonder if it's by any chance related to issue 2414.

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


More information about the Digitalmars-d-bugs mailing list