Permalink
Browse files

Merge pull request #1447 from 9rnsr/fix9266

Issue 9266 - Cannot define two Tuple objects. (Regression in 2.061)
  • Loading branch information...
2 parents a899e61 + 60d4a73 commit 8587727bccc99f59ec47b3626e9c3200e9515432 @donc donc committed Jan 9, 2013
Showing with 21 additions and 1 deletion.
  1. +4 −1 src/template.c
  2. +17 −0 test/runnable/template9.d
View
@@ -4671,7 +4671,10 @@ Dsymbol *TemplateInstance::syntaxCopy(Dsymbol *s)
ti->tiargs = arraySyntaxCopy(tiargs);
- ScopeDsymbol::syntaxCopy(ti);
+ if (inst)
+ tempdecl->ScopeDsymbol::syntaxCopy(ti);
+ else
+ ScopeDsymbol::syntaxCopy(ti);
return ti;
}
@@ -1902,6 +1902,22 @@ void test9143()
}
/**********************************/
+// 9266
+
+template Foo9266(T...)
+{
+ T Foo9266;
+}
+struct Bar9266()
+{
+ alias Foo9266!int f;
+}
+void test9266()
+{
+ Bar9266!() a, b;
+}
+
+/**********************************/
int main()
{
@@ -1973,6 +1989,7 @@ int main()
test9124a();
test9124b();
test9143();
+ test9266();
printf("Success\n");
return 0;

0 comments on commit 8587727

Please sign in to comment.