www.digitalmars.com         C & C++   DMDScript  

D - [Bug!] Operator Overload

BUG: compiler crash: Internal error: e2ir.c 133

//Note that code is not smanticly correct as it has been reduced.

//Note that code is not smanticly correct as it has been reduced.
struct vec2
{
    vec2 opAddAssign (vec2 b) { return *this; }
    void set(vec2 val) {  };
}

void set(vec2 val) {  };

int main( char [] [] args )
{
    vec2 v1, v2;
    set(v1 + v2); //This line causes compiler crash: Internal error: 
e2ir.c 133
    v1.set(v1 + v2); //This line causes compiler crash: Internal error: 
e2ir.c 133
    return 1;
}

-Anderson
Jan 06 2004