Bug 11162 – Cannot use implicit ctor call with enum members

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-10-03T05:45:54Z
Last change time
2024-12-13T18:12:14Z
Assigned to
No Owner
Creator
Andrej Mitrovic
Moved to GitHub: dmd#18687 →

Comments

Comment #0 by andrej.mitrovich — 2013-10-03T05:45:54Z
----- struct S { this(int) { } } void main() { S s = 0; // ok enum E : S { a = 0, // fail } } ----- $ dmd test.d test.d(12): Error: cannot implicitly convert expression (0) of type int to S This might be a dupe report, but I couldn't find an equivalent.
Comment #1 by andrej.mitrovich — 2014-04-27T19:39:01Z
@Kenji: Do you think this is a bug or an invalid issue? It could go either way I guess.
Comment #2 by robert.schadek — 2024-12-13T18:12:14Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18687 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB