www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - "class C(float f)" and auto / C!(1.2)

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


class C(float f){
	float ff = f;
}

int main(){
	auto a = new C!(1.2); // OK
	C!(1.2) b = new C!(1.2); // FAILS

	return 0;
}

gcc b.o -o b -lphobos -lpthread -lm -Xlinker -L/opt/dmd/140/dmd/lib 
b.o(.gnu.linkonce.d._init_1b29__T1CVde00000000000000000000Z1C+0x0): multiple
definition of `_init_1b29__T1CVde00000000000000000000Z1C'
b.o(.gnu.linkonce.d._init_1b29__T1CVde00000000000000000000Z1C+0x0): first
defined here
b.o(.gnu.linkonce.d._Class_1b29__T1CVde00000000000000000000Z1C+0x0): multiple
definition of `_Class_1b29__T1CVde00000000000000000000Z1C'
b.o(.gnu.linkonce.d._Class_1b29__T1CVde00000000000000000000Z1C+0x0): first
defined here
b.o(.gnu.linkonce.d._vtbl_1b29__T1CVde00000000000000000000Z1C+0x0): multiple
definition of `_vtbl_1b29__T1CVde00000000000000000000Z1C'
b.o(.gnu.linkonce.d._vtbl_1b29__T1CVde00000000000000000000Z1C+0x0): first
defined here
collect2: ld returned 1 exit status
- --- errorlevel 1

Added to DStress as
http://dstress.kuehne.cn/run/t/template_class_13_A.d
http://dstress.kuehne.cn/run/t/template_class_13_B.d

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFDh+6c3w+/yD4P9tIRAtfRAKCNqHl+blX0494wgZ7RKNgNcZj3wACfWkQV
sk1iIGLlgibvt1YYKzQLJc4=
=Tce+
-----END PGP SIGNATURE-----
Nov 26 2005