[Issue 19652] New: [REG2.084] alias this chain no longer works
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Feb 5 21:29:10 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=19652
Issue ID: 19652
Summary: [REG2.084] alias this chain no longer works
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: regression
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: johanengelen at weka.io
The following code used to compile but no longer does with dmd 2.084:
```
struct Base {
int i;
}
struct A {
Base base;
alias base this;
}
struct B {
A a;
alias a this;
}
auto asGeneric(inout ref Base block) @nogc {
return █
}
B* thingie;
auto foo() {
return asGeneric(*thingie);
}
```
Error: `cast(Base)(*thingie).a` is not an lvalue and cannot be modified
--
More information about the Digitalmars-d-bugs
mailing list