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
Comment #2 by k.hara.pg — 2014-08-18T12:16:48Z
Comment #3 by github-bugzilla — 2014-08-22T05:03:34Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/b4500911add6b24bb610cae050e31dab61f6cf3f fix Issue 13299 - Property not found with typesafe variadic opDispatch https://github.com/D-Programming-Language/dmd/commit/1a106370e606e3023bb7e45b367d2b974b72eb19 Merge pull request #3874 from 9rnsr/fix13299 [REG2.066a] Issue 13299 - Property not found with typesafe variadic opDispatch
Comment #4 by github-bugzilla — 2014-08-28T04:10:16Z
Commit pushed to 2.066 at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/b2476cd9d1764106678d1778aff03876345f987c Merge pull request #3874 from 9rnsr/fix13299 [REG2.066a] Issue 13299 - Property not found with typesafe variadic opDispatch