D-Programming-Language/dmd — pull request #1358 by AndrejMitrovic (2012-12-08 17:00:39+00:00)
Title: Fix Issue 2950 - Allow switch on enum of string base type.

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

This is only a partial fix since this won't compile with the `-g` switch. When EnumDeclaration::toDebug` is called, it calls `cv4_Denum` which expects the enum to have an integer base type. It tries to call `toInteger` method on the enum declaration.

`cv4_Denum` is a very complicated function, I don't know how to implement a fix there.