D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 15674 - [REG 2.066] alias this rejected for 'out' parameter
Summary: [REG 2.066] alias this rejected for 'out' parameter
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P1 regression
Assignee: No Owner
URL:
Keywords: pull, rejects-valid
Depends on:
Blocks:
 
Reported: 2016-02-12 14:05 UTC by Mathias Lang
Modified: 2016-02-24 02:55 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Mathias Lang 2016-02-12 14:05:27 UTC
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 Mathias LANG 2016-02-13 01:12:06 UTC
Digger points to #4091
Comment 3 github-bugzilla 2016-02-23 15:13:46 UTC
Commits pushed to stable at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/89c63bf1e1a508472fc88ac355fa7ccd39fe7802
fix Issue 15674 - alias this rejected for 'out' parameter

https://github.com/D-Programming-Language/dmd/commit/7d1e77fe5a84a0eac0e1898b54f7e724302cf409
Merge pull request #5451 from 9rnsr/fix15674

[REG 2.066] Issue 15674 - alias this rejected for 'out' parameter