digitalmars.D.bugs - [Issue 717] New: toobj.c:191: virtual void ClassDeclaration::toObjFile(): Assertion `!scope' failed.
- d-bugmail puremagic.com (49/49) Dec 22 2006 http://d.puremagic.com/issues/show_bug.cgi?id=717
- d-bugmail puremagic.com (33/33) Sep 18 2007 http://d.puremagic.com/issues/show_bug.cgi?id=717
- d-bugmail puremagic.com (9/9) Oct 30 2007 http://d.puremagic.com/issues/show_bug.cgi?id=717
http://d.puremagic.com/issues/show_bug.cgi?id=717
Summary: toobj.c:191: virtual void ClassDeclaration::toObjFile():
Assertion `!scope' failed.
Product: D
Version: 0.177
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla digitalmars.com
ReportedBy: thomas-dloop kuehne.cn
(Originally posted by bobef <bobef lessequal.com> on 2006-03-01
as news:du4ojh$1b0n$1 digitaldaemon.com)
and
cause the compiler message:
toobj.c:195: virtual void ClassDeclaration::toObjFile(): Assertion `!scope'
failed
test cases:
http://dstress.kuehne.cn/nocompile/c/class_22_C.d
http://dstress.kuehne.cn/nocompile/c/class_22_E.d
--
Dec 22 2006
http://d.puremagic.com/issues/show_bug.cgi?id=717
smjg iname.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |smjg iname.com
Keywords| |diagnostic, ice-on-invalid-
| |code
Please remember to assign keywords to bug reports. To everybody reading this:
Please look through issues you've reported and check for missing keywords.
As I try it in DMD 1.020 (Windows), I don't get a crash, but these error
messages:
bz717a.d(2): class bz717a.main.T!().A has forward references
bz717a.d(4): class bz717a.main.T!().B has forward references
bz717b.d(2): class bz717b.main.T!().B has forward references
If I put the classes into main directly....
----------
void main(){
class B : A{
}
class A{
}
}
----------
bz717c.d(2): Error: identifier 'A' is not defined
bz717c.d(2): Error: A is used as a type
bz717c.d(2): class bz717c.main.B base type must be class or interface, not void
----------
I'm not sure if your second testcase and mine should be legal. It's in the
spec (unless it's changed since I looked) that nested functions can't
forward-reference each other, but I'm not sure if this applies to classes
within functions as well.
--
Sep 18 2007
http://d.puremagic.com/issues/show_bug.cgi?id=717
bugzilla digitalmars.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WORKSFORME
Gives decent error message, no seg fault, with dmd 1.022 and 2.006.
--
Oct 30 2007









d-bugmail puremagic.com 