www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Dmd freezes if the module name is used as a class name.

Hi.

dmd freezes if the module name is used as a class name under a certain
condition.
The condition is as follows. 

* compile OK ****
* a0.d ***********
import b0;

void main() {
b0 r;
}
* b0.d ***********
import a0;
class b0{}
*****************
dmd a0.d b0.d        ... OK
* freeze 1 ****** * a1.d ********** import b1; void main() { b1 r; } * b1.d ********** import a1; class B1{} *****************
dmd a1.d b1.c   ... freeze
* freeze 2 ****** * a2.d ********** import b2; void main() { b2 r; } * b2.d ********** import a2; *****************
dmd a2.d b2.d   ... freeze
dmd -c a2.d     ... freeze
dmd -c b2.d     ... ok
* compile error * * a3.d ********** import b3; void main() { b3 r; b4 r2; } * b3.d (empty)*** *****************
dmd a3.d b3.d    ... compile error
a3.d(4): import a3.b3 is used as a type a3.d(4): variable a3.main.r voids have no value a3.d(5): identifier 'b4' is not defined a3.d(5): b4 is used as a type a3.d(5): variable a3.main.r2 voids have no value ------ This bug was written in Japanese D language Wiki. http://f17.aaa.livedoor.jp/~labamba/?BugTrack%2F14 thanks, Hiroshi Sakurai
Jun 05 2005