mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
fix issue 23733 - Can't use template type parameter as type of alias parameter (#15691)
This commit is contained in:
parent
c5c0462953
commit
966029fc75
2 changed files with 8 additions and 0 deletions
|
@ -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();
|
||||
|
|
|
@ -5036,6 +5036,13 @@ void test15653()
|
|||
|
||||
/******************************************/
|
||||
|
||||
template foo23733(T, alias T a) {}
|
||||
|
||||
int n23733;
|
||||
alias _ = foo23733!(int, n23733);
|
||||
|
||||
/******************************************/
|
||||
|
||||
int main()
|
||||
{
|
||||
test1();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue