Bug 14244 – 2.067: Error when 'this' used as ref parameter

Status
RESOLVED
Resolution
DUPLICATE
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2015-03-04T16:55:00Z
Last change time
2015-03-05T01:16:00Z
Assigned to
nobody
Creator
dragoscarp

Comments

Comment #0 by dragoscarp — 2015-03-04T16:55:28Z
class Foo { public int baz() { return bar(this); } } public int bar(ref Foo foo) { return 0; } int main() { return 0; } 2.066 compiles without error, 2.067-b3 outputs: test.d(5) function test.bar (ref Foo foo) is not callable using argument types (Foo).
Comment #1 by safety0ff.bugz — 2015-03-04T20:26:03Z
Looks like it was a bug before and fixed in 2.067. It might have been fixed as part of issue 13116. The error message should be improved (IMO.)
Comment #2 by k.hara.pg — 2015-03-05T01:16:00Z
*** This issue has been marked as a duplicate of issue 13934 ***