Bug 7991 – Regression (2.058): Cannot pass subtype by reference

Status
RESOLVED
Resolution
DUPLICATE
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-04-26T13:25:00Z
Last change time
2012-05-20T23:46:01Z
Assigned to
nobody
Creator
andrej.mitrovich

Comments

Comment #0 by andrej.mitrovich — 2012-04-26T13:25:52Z
This used to work in 2.057: struct Foo { } struct Bar { Foo foo; alias foo this; } void test(ref Foo foo) { } void main() { Bar bar; test(bar); } But in 2.058 and 2.059: Error: function test.test (ref Foo foo) is not callable using argument types (Bar)
Comment #1 by k.hara.pg — 2012-05-20T23:46:01Z
*** This issue has been marked as a duplicate of issue 7945 ***