enum foo(int n) = 2;
enum foo(alias sym) = 3;
string str;
static assert(foo!str == 3); // line 13
With dmd 2.070.2, compiler gives:
enumaliasparam.d(13): Error: static variable str cannot be read at compile time
If I uncomment the foo(int n) overload, it does compile. str is not an int, so that overload should not affect the assert.
Comment #1 by robert.schadek — 2024-12-13T18:47:09Z