[Issue 23117] crash in @safe code after CTFE

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue May 17 10:33:18 UTC 2022


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

--- Comment #2 from Dennis <dkorpel at live.nl> ---
Reduced some more:
```
@safe:

auto crash = foo(10);

void main()
{
    assert(crash.front == 10);
}

struct Map(alias f)
{
    int front() { return f(); }
}

auto foo(int r)
{
    return Map!(() => r)();
}
```

--


More information about the Digitalmars-d-bugs mailing list