digitalmars.D.bugs - [Issue 13299] New: [dmd-2.066-rc2] - Property not found with
- via Digitalmars-d-bugs (37/37) Aug 15 2014 https://issues.dlang.org/show_bug.cgi?id=13299
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 puremagic.com Reporter: jkrempus 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. --
Aug 15 2014