This happened in real code due to a mishap where I've accidentally removed the name of a function in a function call. .\test.d: module test; import bar.barmod; void main() { (FALSE); // used to be Foo(FALSE); } void Foo(BOOL) { } .\bar\barmod.d: module bar.barmod; alias int BOOL; enum : BOOL { FALSE = 0, TRUE = 1 } $ dmd test.d -I. bar\barmod.d(5): Error: long has no effect in expression (0) In my case it pointed the error to the WinAPI library, that was a real WTF moment and it took me a while before I spotted where the syntax error really was.
Simplified test case: foo.d: import bar; void main() { return TRUE; } bar.d: enum TRUE = 1; $ rdmd foo.d: bar.d(1): Error: long has no effect in expression (1) I'm raising the priority because it's extremely infuriating getting an error message that points to a completely different module, making this bug hard to track.
*** This issue has been marked as a duplicate of issue 3630 ***