[Issue 446] New: Anonymous class and "return without calling constructor"

Thomas Kuehne thomas-dloop at kuehne.cn
Wed Nov 8 07:33:30 PST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

d-bugmail at puremagic.com 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-----



More information about the Digitalmars-d-bugs mailing list