DMD compiler exception

Frits van Bommel fvbommel at REMwOVExCAPSs.nl
Mon May 12 04:14:56 PDT 2008


Benjamin Schulte wrote:
> Hi!
> I just got a DMD compiler exception. It quits with the message "abnormal program termination".
> 
> Here is the compiler output I get.
> D:\dmd\project\...\kui\basic\object.d(7): Error: identifier 'Object' is not defined
> D:\dmd\project\...\kui\basic\object.d(7): Error: Object is used as a type
> Assertion failure: 'b->type->ty == Tclass' on line 421 in file 'class.c'
> 
> And here is the source file I guess it's the reason
> 1: /*********************************************************************
> 2:  * Basic KUI object
> 3: *********************************************************************/
> 4: module kui.basic.object;
> 5: 
> 6: class KUIObject
> 7: {
> 8: }
> 9: 
> 10: /********************************************************************/
> 
> I just downloaded the newest DMD version 1.028 and tried again - Error still appears.
> 
> Do you need any more informations?

It looks like DMD assumes any file named 'object.d' will be the file 
that declares the root Object class, regardless of module declaration. 
This is unfortunate, but easy to work around: rename your object.d to 
something else, such as kuiobject.d or Object.d (with capital O).



More information about the Digitalmars-d mailing list