[Issue 23986] New: ICE: dip1021 asserts on `typeof(null)` parameter
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Jun 10 18:04:49 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23986
Issue ID: 23986
Summary: ICE: dip1021 asserts on `typeof(null)` parameter
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: dkorpel at live.nl
```
// REQUIRED_ARGS: -preview=dip1021 -o-
@safe:
void f(typeof(null) obj, int* x) {}
void g()
{
f(null, null);
}
```
Hits the `default: assert(0)` in dmd.escape.isReferenceToMutable, because it
doesn't have a case for `Tnull`.
--
More information about the Digitalmars-d-bugs
mailing list