-- 1 module test; 2 enum { A = 0, B, C } 3 enum E { A = 0, B, C } 4 void func1(){ 5 return A;} 6 void func2(){ 7 return E.A;} 8 void func3(){ 9 return 0;} -- test.d(2): Error: long has no effect in expression (0) // should point to line 5, very annoying to find this kind of bug! test.d(7): Error: long has no effect in expression (cast(E)0) // correct line but still incomprehensible test.d(9): Error: long has no effect in expression (0) // correct line but say what?
I cannot reproduce this in git master. I get error for trying to return something from void functions, which is the correct behavior.