www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - DMD compiler exception

reply Benjamin Schulte <Aldoric gmx.de> writes:
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
next sibling parent Sivo Schilling <sivo.schilling web.de> writes:
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
prev sibling parent Frits van Bommel <fvbommel REMwOVExCAPSs.nl> writes:
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