Bug 23986 – ICE: dip1021 asserts on `typeof(null)` parameter

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2023-06-10T18:04:49Z
Last change time
2023-06-16T09:08:01Z
Keywords
pull
Assigned to
No Owner
Creator
Dennis

Comments

Comment #0 by dkorpel — 2023-06-10T18:04:49Z
``` // 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`.
Comment #1 by dlang-bot — 2023-06-10T18:08:32Z
@dkorpel created dlang/dmd pull request #15305 "Fix 23986 - ICE: dip1021 asserts on `typeof(null)` parameter" fixing this issue: - Fix 23986 - ICE: dip1021 asserts on `typeof(null)` parameter https://github.com/dlang/dmd/pull/15305
Comment #2 by dlang-bot — 2023-06-10T22:52:16Z
dlang/dmd pull request #15305 "Fix 23986 - ICE: dip1021 asserts on `typeof(null)` parameter" was merged into stable: - 83c3cddb561ad5c44a7a3d68fdd24cefea48cf46 by Dennis Korpel: Fix 23986 - ICE: dip1021 asserts on `typeof(null)` parameter https://github.com/dlang/dmd/pull/15305
Comment #3 by dlang-bot — 2023-06-16T09:07:55Z
dlang/dmd pull request #15325 "merge stable" was merged into master: - eeaeb89ba5789e2eabfdbd30e6a603f8beb12849 by Dennis Korpel: Fix 23986 - ICE: dip1021 asserts on `typeof(null)` parameter https://github.com/dlang/dmd/pull/15325
Comment #4 by dlang-bot — 2023-06-16T09:08:01Z
dlang/dmd pull request #15310 "Merge stable" was merged into master: - eeaeb89ba5789e2eabfdbd30e6a603f8beb12849 by Dennis Korpel: Fix 23986 - ICE: dip1021 asserts on `typeof(null)` parameter https://github.com/dlang/dmd/pull/15310