Eg, the following code should compile:
template ID(alias a){ alias ID=a; }
class C{
int x=3;
alias a = ID!(()=>x);
}
static assert(new C().a()==3);
Comment #1 by timon.gehr — 2014-03-02T13:16:43Z
*** Issue 7653 has been marked as a duplicate of this issue. ***
Comment #2 by pro.mathias.lang — 2020-12-31T04:58:20Z
```
class C{
int x=3;
auto a() => x;
}
static assert(new C().a()==3);
```
This now compiles with `-preview=shortenedMethod`.
Marking as a duplicate of 7176 as a consequence.
*** This issue has been marked as a duplicate of issue 7176 ***
Comment #3 by timon.gehr — 2020-12-31T12:11:52Z
This is not a duplicate, this issue is not about syntax at all!
Comment #4 by robert.schadek — 2024-12-13T18:17:43Z