diff --git a/src/template.c b/src/template.c index 44277882b3da..9df86892aadf 100644 --- a/src/template.c +++ b/src/template.c @@ -2042,22 +2042,6 @@ RootObject *TemplateDeclaration::declareParameter(Scope *sc, TemplateParameter * Dsymbol *s; VarDeclaration *v = NULL; - // See if tp->ident already exists with a matching definition - Dsymbol *scopesym; - s = sc->search(loc, tp->ident, &scopesym); - if (s && scopesym == sc->scopesym) - { - TupleDeclaration *td = s->isTupleDeclaration(); - if (va && td) - { Tuple tup; - tup.objects = *td->objects; - checkRecursiveExpansion(va, this, sc); - if (match(va, &tup)) - { - return o; - } - } - } if (ea && ea->op == TOKtype) targ = ea->type; else if (ea && ea->op == TOKimport) diff --git a/test/compilable/imports/test10375a.d b/test/compilable/imports/test10375a.d new file mode 100644 index 000000000000..36d84c050139 --- /dev/null +++ b/test/compilable/imports/test10375a.d @@ -0,0 +1,6 @@ +module imports.test10375a; + +private template Pack(T...) +{ + alias T tuple; +} diff --git a/test/compilable/test10375.d b/test/compilable/test10375.d new file mode 100644 index 000000000000..b9704f6a2446 --- /dev/null +++ b/test/compilable/test10375.d @@ -0,0 +1,13 @@ +// REQUIRED_ARGS: -o- + +import imports.test10375a; + +void packIt(Pack)(Pack p){ } //3 + +void main() +{ + alias p = packIt!(int); + p(2); // OK <- NG + packIt(2); // OK <- NG + packIt!(int)(2); // OK <- NG +}