Thread overview |
---|
February 10, 2007 [Issue 946] New: Circular reference undetected in some cases | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=946 Summary: Circular reference undetected in some cases Product: D Version: 1.005 Platform: PC OS/Version: Windows Status: NEW Keywords: accepts-invalid Severity: minor Priority: P3 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: thecybershadow@gmail.com ====== A.d ====== module A; import std.stdio; import B; int Avar; static this() { Avar = 5; writefln(Bvar); } void main() { } ====== B.d ====== module B; import std.stdio; import C; int Bvar; static this() { Bvar = 5; writefln(Avar); } ====== C.d ====== module C; public import A; ================= The program compiles, and outputs: 0 5 (A's constructor gets called before B's). Related code is in _moduleCtor2 from moduleinit.d - if a module has no static constructors/destructors, any circular references in its imported modules are ignored (the skip parameter). -- |
April 06, 2007 [Issue 946] Circular reference undetected in some cases | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=946 thomas-dloop@kuehne.cn changed: What |Removed |Added ---------------------------------------------------------------------------- OS/Version|Windows |All ------- Comment #1 from thomas-dloop@kuehne.cn 2007-04-06 06:29 ------- Added to DStress as http://dstress.kuehne.cn/norun/i/import_20_A.d http://dstress.kuehne.cn/norun/i/import_20_B.d http://dstress.kuehne.cn/norun/i/import_20_C.d -- |
February 01, 2012 [Issue 946] (D1 only) Circular reference undetected in some cases | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=946 yebblies <yebblies@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yebblies@gmail.com Platform|x86 |All Version|1.005 |D1 Summary|Circular reference |(D1 only) Circular |undetected in some cases |reference undetected in | |some cases Severity|minor |normal --- Comment #2 from yebblies <yebblies@gmail.com> 2012-02-01 15:04:54 EST --- Has been fixed in D2 only. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation