fix issue 23733 - Can't use template type parameter as type of alias parameter (#15691)

This commit is contained in:
SixthDot 2023-10-16 00:23:19 +02:00 committed by GitHub
parent c5c0462953
commit 966029fc75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View file

@ -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();

View file

@ -5036,6 +5036,13 @@ void test15653()
/******************************************/
template foo23733(T, alias T a) {}
int n23733;
alias _ = foo23733!(int, n23733);
/******************************************/
int main()
{
test1();