On 2013-08-28 02:26, Jacob Carlborg wrote:
That doesn't look entirely correct. Currently the docs read:
EnumDeclaration:
enum EnumBody
Should probably be:
EnumDeclaration:
enum EnumMembersBody:
agreed.
The last one will fail since "typeof" expects an expression and not a type.
a) so are you saying
enum WhatAmI;
is legal? (just asking because i don't know)
b) what typeof expects/tolerates seems to be a bit of a minefield by itself.
enum test = true;
writeln( typeof(test).stringof ); //prints: bool
enum wtf;
writeln( typeof(wtf).stringof ); //Error: argument wtf to typeof is not
an expression
/det