Thread overview
[Issue 16321] ICE with delegate in UDA
Jul 25, 2016
Ketmar Dark
Jul 25, 2016
Ketmar Dark
Sep 29, 2022
Dennis
Dec 17, 2022
Iain Buclaw
Dec 17, 2022
Iain Buclaw
July 25, 2016
https://issues.dlang.org/show_bug.cgi?id=16321

Ketmar Dark <ketmar@ketmar.no-ip.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ketmar@ketmar.no-ip.org

--
July 25, 2016
https://issues.dlang.org/show_bug.cgi?id=16321

--- Comment #1 from Ketmar Dark <ketmar@ketmar.no-ip.org> ---
and this gives segfault too, but different:

enum nameAttr = __traits(getAttributes, (__traits(getMember, T, m)))[0];
writeln(nameAttr.foo());

Internal error: backend/cod4.c 3206

--
September 29, 2022
https://issues.dlang.org/show_bug.cgi?id=16321

Dennis <dkorpel@live.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice
                 CC|                            |dkorpel@live.nl

--- Comment #2 from Dennis <dkorpel@live.nl> ---
Reduced a bit:
```
struct NameAttribute
{
    int delegate() foo;
}

static NameAttribute getNamedAttribute(alias S)()
{
    return __traits(getAttributes, S)[0];
}

struct MyStruct
{
    @NameAttribute({ return 42; }) int a;
}

void main()
{
    MyStruct m;
    enum nameAttr = getNamedAttribute!(m.a);
}
```

If you remove `static`, you get:
```
Error: need `this` for `getNamedAttribute` of type `pure nothrow @nogc @safe
NameAttribute()`
```

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=16321

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3

--
December 17, 2022
https://issues.dlang.org/show_bug.cgi?id=16321

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
           Severity|normal                      |critical

--
December 13
https://issues.dlang.org/show_bug.cgi?id=16321

--- Comment #3 from dlangBugzillaToGithub <robert.schadek@posteo.de> ---
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/19163

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB

--