June 10, 2023 [Issue 23986] New: ICE: dip1021 asserts on `typeof(null)` parameter | ||||
---|---|---|---|---|
| ||||
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@puremagic.com Reporter: dkorpel@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`. -- |
Copyright © 1999-2021 by the D Language Foundation