[Issue 20808] [regression] opDispatch error disappears!

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri May 8 20:27:29 UTC 2020


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

moonlightsentinel at disroot.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |moonlightsentinel at disroot.o
                   |                            |rg

--- Comment #1 from moonlightsentinel at disroot.org ---
Reduced example:

====================================
struct var
{
        @property opDispatch(string file, T)(T)
        // if (is(T==char))
        {}
}

void main()
{
        var globals;
        globals.printInt = 2;
}
===================================

Removing `string file` pr enabling the template constraints makes DMD issue a
proper error message:
=> main.d(12): Error: no property printInt for type main.var

--


More information about the Digitalmars-d-bugs mailing list