[svn r89] Fixed a bunch of problems with template instance across multiple modules.

Fixed initialization of function local static variables, with a non const initializer (now happens on first call using a global to make sure it only happens once.)
This commit is contained in:
Tomas Lindquist Olsen
2007-11-02 06:32:32 +01:00
parent 3e3579da22
commit 1b867a0588
8 changed files with 114 additions and 36 deletions

11
test/templ1.d Normal file
View File

@@ -0,0 +1,11 @@
module templ1;
T func1(T)(T a)
{
static T b = a;
return b;
}
void main()
{
}

7
test/templ2.d Normal file
View File

@@ -0,0 +1,7 @@
module templ2;
import templ1;
void main()
{
func1(1);
}