diff --git a/compiler/src/dmd/dtemplate.d b/compiler/src/dmd/dtemplate.d index 5583dd4790..23d1140fe3 100644 --- a/compiler/src/dmd/dtemplate.d +++ b/compiler/src/dmd/dtemplate.d @@ -8272,6 +8272,7 @@ MATCH matchArg(TemplateParameter tp, Scope* sc, RootObject oarg, size_t i, Templ */ if (tap.specType) { + tap.specType = typeSemantic(tap.specType, tap.loc, sc); Declaration d = (cast(Dsymbol)sa).isDeclaration(); if (!d) return matchArgNoMatch(); diff --git a/compiler/test/runnable/template9.d b/compiler/test/runnable/template9.d index fa70b81c78..7a55b2dbfe 100644 --- a/compiler/test/runnable/template9.d +++ b/compiler/test/runnable/template9.d @@ -5036,6 +5036,13 @@ void test15653() /******************************************/ +template foo23733(T, alias T a) {} + +int n23733; +alias _ = foo23733!(int, n23733); + +/******************************************/ + int main() { test1();