← Back to index
|
Original Bugzilla link
Bug 10361 – Cross-module overloading conflict between unordered functions
Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-06-14T22:37:45Z
Last change time
2024-12-13T18:08:09Z
Assigned to
No Owner
Creator
Tommi
Moved to GitHub: dmd#17592 →
Comments
Comment #0
by tommitissari — 2013-06-14T22:37:45Z
It seems that during function partial ordering the compiler thinks that an int-based enum is implicitly convertible to char: --------- module a; void foo(char) { } --------- module b; enum MyEnum : int { _ } void foo(MyEnum) { } --------- module main; import a; import b; void main() { foo(char.init); foo(MyEnum.init); // [1] } // 1) Error: b.foo at b.d(5) conflicts with a.foo at a.d(3)
Comment #1
by yebblies — 2013-11-21T04:07:37Z
MyEnum.init _is_ convertible to char, because it is known at compile time, and range propagation allow the conversion.
Comment #2
by robert.schadek — 2024-12-13T18:08:09Z
THIS ISSUE HAS BEEN MOVED TO GITHUB
https://github.com/dlang/dmd/issues/17592
DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB