Thread overview
Assertion failure: 'id->dyncast() == DYNCAST_IDENTIFIER' on line 2567 in file 'mtype.c'
May 18, 2004
J Anderson
May 18, 2004
J Anderson
May 20, 2004
Michael Coupland
May 18, 2004
> I get a:
>
> Assertion failure: 'id->dyncast() == DYNCAST_IDENTIFIER' on line 2567 in file 'mtype.c'
>
> With the new DMD .89 (I'm not using mixins and the code worked in .88).
>
> I'm going to try to find the problematic code.
>
Code that causes this error:

struct Standard
{
     struct NodeLeaf(NodeInfo, LeafInfo)
   {
       struct Node
       {
           NodeInfo info;
       }
             struct Leaf
       {
           LeafInfo info;
       }
         }
  }

struct NodeInfo {  }
struct LeafInfo {  }

alias Standard.NodeLeaf!(NodeInfo, LeafInfo).Node Node;

int main( char[][] args )
{
   return 0;
}

Of course mixins seem to be a good workaround for this.

-- 
-Anderson: http://badmama.com.au/~anderson/
May 18, 2004
J Anderson wrote:

>> I get a:
>>
>> Assertion failure: 'id->dyncast() == DYNCAST_IDENTIFIER' on line 2567 in file 'mtype.c'
>>
>> With the new DMD .89 (I'm not using mixins and the code worked in .88).
>>
>> I'm going to try to find the problematic code.
>>
> Code that causes this error:
>
> struct Standard
> {
>      struct NodeLeaf(NodeInfo, LeafInfo)
>    {
>        struct Node
>        {
>            NodeInfo info;
>        }
>              struct Leaf
>        {
>            LeafInfo info;
>        }
>          }
>   }
>
> struct NodeInfo {  }
> struct LeafInfo {  }
>
> alias Standard.NodeLeaf!(NodeInfo, LeafInfo).Node Node;
>
> int main( char[][] args )
> {
>    return 0;
> }
>
> Of course mixins seem to be a good workaround for this.
>
It's the alias that causes the error.  What's interesting is if I change it to:

alias Standard.NodeLeaf NodeLeaf;
alias NodeLeaf!(NodeInfo, LeafInfo).Node Node;

It works.

-- 
-Anderson: http://badmama.com.au/~anderson/
May 20, 2004
> It's the alias that causes the error.  What's interesting is if I change it to:
> 
> alias Standard.NodeLeaf NodeLeaf;
> alias NodeLeaf!(NodeInfo, LeafInfo).Node Node;
> 
> It works.
> 

I'm having the same problem.
I get the DYNCAST_IDENTIFIER error for:

	alias mcoupland.vector.Vec2!(float) Vec2f;

but have no problems with:

	alias mcoupland.vector.Vec2 Vec2;
	alias Vec2!(float) Vec2f;

		Michael Coupland