Bug 21882 – [ICE][dip1021] src/dmd/escape.d(1850): Assertion failure

Status
RESOLVED
Resolution
FIXED
Severity
critical
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-04-30T11:06:44Z
Last change time
2021-05-12T10:39:29Z
Keywords
ice-on-valid-code, pull
Assigned to
No Owner
Creator
Iain Buclaw

Comments

Comment #0 by ibuclaw — 2021-04-30T11:06:44Z
Reduced test compiled with: -preview=dip1021 --- void byCodeUnit() { struct ByCodeUnitImpl { auto opIndex(size_t ) {} } isRandomAccessRange!ByCodeUnitImpl; } enum isRandomAccessRange(R) = lvalueOf!R[1]; ref T lvalueOf(T)(); --- Going to make another reduction that works with -dip1000 but not -dip1021.
Comment #1 by ibuclaw — 2021-04-30T12:31:10Z
Reduced test that compiles with -preview=dip1000, but not dip1021. --- @property deleteme() { char[] cache; buildPath(cache); } char[] buildPath(char[][]) { struct ByCodeUnitImpl { auto opIndex(size_t ) { } } assert(isRandomAccessRange!ByCodeUnitImpl); return []; } char[] buildPath(C)(C[][] paths...) { return buildPath(paths); } enum isRandomAccessRange(R) = is(typeof(lvalueOf!R[1])); ref T lvalueOf(T)(); ---
Comment #2 by ibuclaw — 2021-04-30T12:32:30Z
(In reply to Iain Buclaw from comment #1) > Reduced test that compiles with -preview=dip1000, but not dip1021. Further reduced: --- void buildPath(char[][]) { struct ByCodeUnitImpl { auto opIndex(size_t ) { } } assert(isRandomAccessRange!ByCodeUnitImpl); } enum isRandomAccessRange(R) = is(typeof(lvalueOf!R[1])); ref T lvalueOf(T)(); ---
Comment #3 by dlang-bot — 2021-05-04T14:42:52Z
@ibuclaw created dlang/dmd pull request #12498 "fix Issue 21882 - [ICE, dip1021] src/dmd/escape.d(1850): Assertion failure" fixing this issue: - fix Issue 21882 - [ICE, dip1021] src/dmd/escape.d(1850): Assertion failure https://github.com/dlang/dmd/pull/12498
Comment #4 by dlang-bot — 2021-05-05T02:57:22Z
dlang/dmd pull request #12498 "fix Issue 21882 - [ICE, dip1021] src/dmd/escape.d(1850): Assertion failure" was merged into stable: - ffcdb35f38c7f04eba4c4bb0b67602319b66c533 by Iain Buclaw: fix Issue 21882 - [ICE, dip1021] src/dmd/escape.d(1850): Assertion failure https://github.com/dlang/dmd/pull/12498
Comment #5 by dlang-bot — 2021-05-12T10:39:29Z
dlang/dmd pull request #12516 "merge stable" was merged into master: - da751c2dbd25d29bc925cf1c20dac727b73a672b by Iain Buclaw: fix Issue 21882 - [ICE, dip1021] src/dmd/escape.d(1850): Assertion failure https://github.com/dlang/dmd/pull/12516