Why does the following code fail to compile, while changing the case statement to
case ENUM1: doSomeStuff();
works?
public enum EnumType { ENUM1, ENUM2, ENUM3; void doSomeStuff() { switch(this) { case EnumType.ENUM1: doSomeStuff(); } } }