digitalmars.D - DMD compiler exception
- Benjamin Schulte (19/19) May 12 2008 Hi!
- Sivo Schilling (5/28) May 12 2008 Hi Benjamin,
- Frits van Bommel (5/28) May 12 2008 It looks like DMD assumes any file named 'object.d' will be the file
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?
May 12 2008
Hi Benjamin, if you rename your module to kuiobject.d and edit line 4 to become "module kui.basic.kuiobject" then DMD should be happy. Regards. 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?
May 12 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).
May 12 2008