Thread overview
[Issue 21882] [ICE][dip1021] src/dmd/escape.d(1850): Assertion failure
Apr 30, 2021
Iain Buclaw
Apr 30, 2021
Iain Buclaw
Apr 30, 2021
Iain Buclaw
May 04, 2021
Dlang Bot
May 05, 2021
Dlang Bot
May 12, 2021
Dlang Bot
April 30, 2021
https://issues.dlang.org/show_bug.cgi?id=21882

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ibuclaw@gdcproject.org

--- Comment #1 from Iain Buclaw <ibuclaw@gdcproject.org> ---
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)();
---

--
April 30, 2021
https://issues.dlang.org/show_bug.cgi?id=21882

--- Comment #2 from Iain Buclaw <ibuclaw@gdcproject.org> ---
(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)();
---

--
April 30, 2021
https://issues.dlang.org/show_bug.cgi?id=21882

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code

--
May 04, 2021
https://issues.dlang.org/show_bug.cgi?id=21882

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #3 from Dlang Bot <dlang-bot@dlang.rocks> ---
@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

--
May 05, 2021
https://issues.dlang.org/show_bug.cgi?id=21882

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Dlang Bot <dlang-bot@dlang.rocks> ---
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

--
May 12, 2021
https://issues.dlang.org/show_bug.cgi?id=21882

--- Comment #5 from Dlang Bot <dlang-bot@dlang.rocks> ---
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

--