www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - should not compile

reply "M. Z. Hossain" <z_hossain icmail.net> writes:
This code should not compile without any complain.

class C {
 
 this(int t) {;}
 this() {;}
 
 this() {;}
}

void main() {
 new C(0);
}


OPTLINK (R) for Win32  Release 8.00.1
Copyright (C) Digital Mars 1989-2004  All rights reserved.
test2.obj(test2)  Offset 002D6H Record Type 00C3
 Error 1: Previous Definition Different : _D5test21C5_ctorMFZC5test21C
--- errorlevel 1
Mar 01 2009
parent Jarrett Billingsley <jarrett.billingsley gmail.com> writes:
On Sun, Mar 1, 2009 at 11:19 AM, M. Z. Hossain <z_hossain icmail.net> wrote=
:
 This code should not compile without any complain.

 class C {

 this(int t) {;}
 this() {;}

 this() {;}
 }

 void main() {
 new C(0);
 }


 OPTLINK (R) for Win32 =A0Release 8.00.1
 Copyright (C) Digital Mars 1989-2004 =A0All rights reserved.
 test2.obj(test2) =A0Offset 002D6H Record Type 00C3
 Error 1: Previous Definition Different : _D5test21C5_ctorMFZC5test21C
 --- errorlevel 1
No, it should compile with a complaint, except the compiler should be the one complaining, not the linker.
Mar 01 2009