[Issue 21471] New: Backend assertion triggered with `-checkation=context` and `-inline`
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Dec 11 16:46:33 UTC 2020
https://issues.dlang.org/show_bug.cgi?id=21471
Issue ID: 21471
Summary: Backend assertion triggered with `-checkation=context`
and `-inline`
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: backend, wrong-code
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: pro.mathias.lang at gmail.com
```
// REQUIRED_ARGS: -checkaction=context -inline
struct S
{
S get()() const { return this; }
}
auto f(S s) { return s; }
void main()
{
auto s = S();
assert(f(s.get) == s);
}
```
See https://github.com/dlang/dmd/pull/11925#issuecomment-722400704
Note that if the compiler wasn't compiler with asserts on, no failure happens,
hence the "wrong-code" tag.
--
More information about the Digitalmars-d-bugs
mailing list