← Back to index
|
Original Bugzilla link
Bug 446 – Anonymous class and "return without calling constructor"
Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2006-10-23T16:51:00Z
Last change time
2014-02-15T13:19:19Z
Assigned to
bugzilla
Creator
benoit
Comments
Comment #0
by benoit — 2006-10-23T16:51:17Z
class CBase { this(){ } } void func2( CBase l ){ } void main(){ if( 1 ){ func2( new class() CBase { this(){ super(); } }); } return; // line 18 } main.d(18): return without calling constructor
Comment #1
by thomas-dloop — 2006-11-08T09:37:39Z
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
[email protected]
schrieb am 2006-10-23: >
http://d.puremagic.com/issues/show_bug.cgi?id=446
> class CBase { > this(){ > } > } > > void func2( CBase l ){ > } > > void main(){ > if( 1 ){ > func2( new class() CBase { > this(){ > super(); > } > }); > } > return; // line 18 > } > > main.d(18): return without calling constructor Added to DStress as
http://dstress.kuehne.cn/run/s/super_14_A.d
http://dstress.kuehne.cn/run/s/super_14_B.d
Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFFUf/dLK5blCcjpWoRAmXRAKCo5LeUXlG/4vL7/u+Iank83esRlwCffcM8 5U+4u/x2PoFE6+46tZw1xAE= =FuiB -----END PGP SIGNATURE-----
Comment #2
by bugzilla — 2006-11-25T03:54:12Z
Fixed DMD 0.175