digitalmars.D.bugs - [Issue 1039] New: DMD hangs with 100% CPU
- d-bugmail puremagic.com (42/42) Mar 08 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1039
- d-bugmail puremagic.com (12/12) Mar 08 2007 http://d.puremagic.com/issues/show_bug.cgi?id=1039
- d-bugmail puremagic.com (20/20) Mar 29 2009 http://d.puremagic.com/issues/show_bug.cgi?id=1039
http://d.puremagic.com/issues/show_bug.cgi?id=1039
Summary: DMD hangs with 100% CPU
Product: D
Version: 1.007
Platform: PC
OS/Version: Windows
Status: NEW
Keywords: ice-on-valid-code
Severity: major
Priority: P2
Component: DMD
AssignedTo: bugzilla digitalmars.com
ReportedBy: r.a3 ntlworld.com
Compiling these files with "dmd module1.d" causes DMD to hang with 100% CPU
usage; it doesn't respond to ^C and needs to be killed with the task manager.
It's annoying!
--- module1.d:
import module2;
import module3;
class FirstClass: FirstInterface
{
mixin Template!(SecondClass);
}
class SecondClass: SecondBaseClass { }
void main() { }
--- module2.d:
import module3;
interface FirstInterface
{
SecondBaseClass func(ThirdClass);
}
template Template( TYPE )
{
TYPE func(ThirdClass)
{
return new TYPE(this);
}
}
--- module3.d:
abstract class SecondBaseClass { }
class ThirdClass { }
--
Mar 08 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1039
Sorry, I made a mistake. Is there no way to edit these? module3.d should be:
import module2;
abstract class SecondBaseClass
{
this(FirstInterface) {}
}
class ThirdClass
{
}
--
Mar 08 2007
http://d.puremagic.com/issues/show_bug.cgi?id=1039
unknown simplemachines.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |unknown simplemachines.org
Status|NEW |RESOLVED
Resolution| |WORKSFORME
This appears to be resolved in (or earlier than) DMD 1.041 and 2.026.
It now shows this error message and exits properly:
module2.d(12): constructor module1.SecondClass.this () does not match parameter
types (FirstClass)
module2.d(12): Error: expected 0 arguments, not 1
module1.d(8): constructor module1.SecondClass.this no match for implicit
super() call in constructor
It compiles fine if I add an explicit constructor to SecondClass calling
super(), which I assume is a covariance issue. If that is a bug it should be
filed separately.
-[Unknown]
--
Mar 29 2009









d-bugmail puremagic.com 