[Issue 12288] delegate literals should be allowed as class members

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 31 04:58:20 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=12288

Mathias LANG <pro.mathias.lang at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |pro.mathias.lang at gmail.com
         Resolution|---                         |DUPLICATE

--- Comment #2 from Mathias LANG <pro.mathias.lang at gmail.com> ---
```
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 ***

--


More information about the Digitalmars-d-bugs mailing list