Bug 13299 – [dmd-2.066-rc2] - Property not found with typesafe variadic opDispatch
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-08-15T20:35:00Z
Last change time
2014-08-28T04:10:16Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
jkrempus
Comments
Comment #0 by jkrempus — 2014-08-15T20:35:40Z
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.
Comment #1 by dlang-bugzilla — 2014-08-15T22:11:41Z