[Issue 10361] New: Cross-module overloading conflict between unordered functions
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jun 14 22:37:46 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=10361
Summary: Cross-module overloading conflict between unordered
functions
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: tommitissari at hotmail.com
--- Comment #0 from Tommi <tommitissari at hotmail.com> 2013-06-14 22:37:45 PDT ---
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)
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list