Bug 15801 – Enum template with alias parameter overload not considered

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2016-03-15T12:37:09Z
Last change time
2024-12-13T18:47:09Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
Nick Treleaven
Moved to GitHub: dmd#17749 →

Comments

Comment #0 by nick — 2016-03-15T12:37:09Z
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
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17749 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB