http://d.puremagic.com/issues/show_bug.cgi?id=10113
Summary: Can't use an enum : string in a switch statement Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: tcdknut...@gmail.com --- Comment #0 from Dylan <tcdknut...@gmail.com> 2013-05-17 23:39:09 PDT --- Instances of an enum of type string can't be passed into a switch or final switch: ---- enum Test : string { Foo = "Foo", } Test a = Test.Foo; switch(a) { case Test.Foo: break; } ---- even though a string is a valid type to pass into a (final) switch. Compiler error: Error: 'a' must be of integral or string type, it is a Test but obviously the underlying type of 'a' is string. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------