[Issue 2389] New: void* vs. object type overloading fails
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Oct 3 18:02:30 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2389
Summary: void* vs. object type overloading fails
Product: D
Version: 1.029
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: shro8822 at vandals.uidaho.edu
one option is an exact match but it still fails? (adding a cast to void* fixes
it)
class C
{
void opIndexAssign(void*,int){}
void opIndexAssign(C,int){}
}
void main()
{
C c = new C;
c[0] = null;
}
Error:
Line 10: function C.opIndexAssign called with argument types:
(void*,int)
matches both:
C.opIndexAssign(void*,int)
and:
C.opIndexAssign(C,int)
--
More information about the Digitalmars-d-bugs
mailing list