mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-07-22 07:05:22 +02:00
[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:
11
test/templ1.d
Normal file
11
test/templ1.d
Normal 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
7
test/templ2.d
Normal file
@@ -0,0 +1,7 @@
|
||||
module templ2;
|
||||
import templ1;
|
||||
|
||||
void main()
|
||||
{
|
||||
func1(1);
|
||||
}
|
||||
Reference in New Issue
Block a user