[Issue 13299] New: [dmd-2.066-rc2] - Property not found with typesafe variadic opDispatch
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Aug 15 13:35:40 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13299
Issue ID: 13299
Summary: [dmd-2.066-rc2] - Property not found with typesafe
variadic opDispatch
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: jkrempus at gmail.com
When compiling this code with DMD 2.066 rc2:
struct Foo
{
Foo opDispatch(string name)(int a, int[] b...)
if(name == "bar")
{
return Foo();
}
Foo opDispatch(string name)()
if(name != "bar")
{
return Foo();
}
}
void main()
{
Foo().bar(0).bar(0).bar(0);
}
I get:
bug.d(21): Error: no property 'bar' for type 'Foo'
If I change the line in main to Foo().bar(0).bar(0) (two bar calls instead of
three), the code compiles. The code also compiles with DMD 2.065.
--
More information about the Digitalmars-d-bugs
mailing list