mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 21:21:48 +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)
|
if (tap.specType)
|
||||||
{
|
{
|
||||||
|
tap.specType = typeSemantic(tap.specType, tap.loc, sc);
|
||||||
Declaration d = (cast(Dsymbol)sa).isDeclaration();
|
Declaration d = (cast(Dsymbol)sa).isDeclaration();
|
||||||
if (!d)
|
if (!d)
|
||||||
return matchArgNoMatch();
|
return matchArgNoMatch();
|
||||||
|
|
|
@ -5036,6 +5036,13 @@ void test15653()
|
||||||
|
|
||||||
/******************************************/
|
/******************************************/
|
||||||
|
|
||||||
|
template foo23733(T, alias T a) {}
|
||||||
|
|
||||||
|
int n23733;
|
||||||
|
alias _ = foo23733!(int, n23733);
|
||||||
|
|
||||||
|
/******************************************/
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
test1();
|
test1();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue