www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - variadic this causes error

reply "Regan Heath" <regan netwin.co.nz> writes:
[bug.d]
import std.stdio;

class A
{
	this(...)
	{
	}
}

void main()
{
	static bit[] arr = [1,0,1,0];
	A a = new A(arr);
}

dmd bug.d -g -debug -unittest

C:\Library\D\dmd\bin\..\..\dm\bin\link.exe test19,,,user32+kernel32/co/noi;

OPTLINK (R) for Win32  Release 7.50B1
Copyright (C) Digital Mars 1989 - 2001  All Rights Reserved

test19.obj(test19)
  Error 42: Symbol Undefined __init_11TypeInfo_Ab
--- errorlevel 1

Tool completed with exit code 1

Regan
Mar 16 2005
parent reply =?ISO-8859-15?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Regan Heath wrote:

 void main()
 {
     static bit[] arr = [1,0,1,0];
     A a = new A(arr);
 }
[...]
 test19.obj(test19)
  Error 42: Symbol Undefined __init_11TypeInfo_Ab
 --- errorlevel 1
That's not the constructor, that's because the typeid for bit arrays (TypeInfo_Ab) is missing... TypeInfo is unfortunately semi-broken at the moment. --anders
Mar 16 2005
parent "Regan Heath" <regan netwin.co.nz> writes:
On Thu, 17 Mar 2005 08:58:42 +0100, Anders F Björklund <afb algonet.se>  
wrote:
 Regan Heath wrote:

 void main()
 {
     static bit[] arr = [1,0,1,0];
     A a = new A(arr);
 }
[...]
 test19.obj(test19)
  Error 42: Symbol Undefined __init_11TypeInfo_Ab
 --- errorlevel 1
That's not the constructor, that's because the typeid for bit arrays (TypeInfo_Ab) is missing... TypeInfo is unfortunately semi-broken at the moment.
Ahh.. changing 'arr' to int[] does fix it. Regan
Mar 17 2005