alias not valid with ~

Ignacious via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jan 18 18:08:45 PST 2017


class Y
{
    int y;
    alias y this;
}

class X
{
    Y[] x;
    alias x this;
}


Yet X ~= 3; fails.

3 should be implicitly convertible to Y and then ~ should assign 
it.

?





More information about the Digitalmars-d-learn mailing list