www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 446] New: Anonymous class and "return without calling constructor"

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=446

           Summary: Anonymous class and "return without calling constructor"
           Product: D
           Version: 0.172
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla digitalmars.com
        ReportedBy: benoit tionex.de


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


-- 
Oct 23 2006
next sibling parent Thomas Kuehne <thomas-dloop kuehne.cn> writes:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

d-bugmail 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-----
Nov 08 2006
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=446


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED





Fixed DMD 0.175


-- 
Nov 25 2006