Bug 20854 – IFTI does not see parameterized base type of enum

Status
NEW
Severity
minor
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2020-05-21T21:05:29Z
Last change time
2024-12-13T19:08:48Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
Steven Schveighoffer
See also
https://issues.dlang.org/show_bug.cgi?id=20850
Moved to GitHub: dmd#19708 →

Comments

Comment #0 by schveiguy — 2020-05-21T21:05:29Z
Since an enum is essentially a typedef, it should perform similarly to alias this. Example: struct S(T) { T t; } void foo(T)(S!T item) { } struct U { S!int s; alias s this; } enum V : S!int { x = S!int(1) } void main() { S!int s; U u; foo(s); // ok foo(u); // ok //foo(V.x); // fails to compile }
Comment #1 by robert.schadek — 2024-12-13T19:08:48Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19708 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB