Tried release build got ICE, does anyone have a clue what might cause this?

Random D user via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Sep 19 15:09:55 PDT 2015


On Saturday, 19 September 2015 at 21:48:25 UTC, Random D user 
wrote:
> Assertion failure: 'type->ty != Tstruct || ((TypeStruct 
> *)type)->sym == this' on line 957 in file 'struct.c'

Ok managed to reduce this one to my own copy paste bug. This is 
invalid code, but compiler shouldn't crash...

I'm posting this here for reference (I will file a bug later):

class Gui
{
     enum MouseButton { Left = 0, Right };

private:

     struct ClickPair
     {
	    MouseButton button = MouseButton.Left;
     };

     struct ClickPair  // Second struct ClickPair with the enum 
above --> Assertion failure: 'type->ty != Tstruct || 
((TypeStruct*)type)->sym == this' on line 957 in file 'struct.c'
     {
	    MouseButton button = MouseButton.Left;
     };
};



More information about the Digitalmars-d-learn mailing list