Bug 15674 – [REG 2.066] alias this rejected for 'out' parameter
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2016-02-12T14:05:00Z
Last change time
2016-02-24T02:55:29Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
mathias.lang
Comments
Comment #0 by mathias.lang — 2016-02-12T14:05:27Z
The following code:
```
void get( out int i)
{
i = 42;
}
struct Foo {
int v;
alias v this;
}
void main ()
{
Foo f;
get(f);
assert(f == 42);
}
```
Produce the following error:
reg.d(14): Error: function reg.get (out int i) is not callable using argument types (Foo)
It used to work in 2.066, broke in 2.067, and is still broken.
It still works with `ref`, though.
Comment #1 by pro.mathias.lang — 2016-02-13T01:12:06Z