Bug 13094 – Refused implicit supertype conversion of different enums in array literal

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-07-11T09:12:26Z
Last change time
2024-12-13T18:22:01Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
bearophile_hugs
Moved to GitHub: dmd#18848 →

Comments

Comment #0 by bearophile_hugs — 2014-07-11T09:12:26Z
enum A { a } enum B { b } struct T { A x; B y; } void main() { T t; auto r1 = [int(t.x), int(t.y)]; // OK auto r2 = [t.tupleof]; // error } Gives with dmd 2.066beta2: test.d(7,16): Error: cannot implicitly convert expression (t.x) of type A to B
Comment #1 by robert.schadek — 2024-12-13T18:22:01Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18848 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB