[Issue 17222] assert in compiler caused by opDispatch

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Dec 12 02:29:17 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=17222

Basile-z <b2.temp at gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice
                 CC|                            |b2.temp at gmx.com

--- Comment #1 from Basile-z <b2.temp at gmx.com> ---
reduced a bit more:

---
template AliasSeq() {  }

template Proxy(alias a)
{
    template opDispatch(string name, T...)
    {
        alias Dummy = AliasSeq!(mixin("a."~name~"!(T)"));
    }
}

class Foo
{
    T ifti1(T)(T) { }
}

static class Hoge
{
    Foo foo;
    mixin Proxy!foo;
}

void main()
{
    Hoge.ifti1;
} 
---

The problem seems to be that there's an attempt to alias an expression but the
error does not prevent the semantic of:

  alias Dummy = AliasSeq!(mixin("a."~name~"!(T)"));

to stop early because we're in a opDispatch which is infamously known for the
problems it creates by ignoring errors.

--


More information about the Digitalmars-d-bugs mailing list