* fixes #8568

* fixes regression
This commit is contained in:
Andreas Rumpf 2019-05-22 20:59:54 +02:00 • committed by GitHub
commit fd16875561
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 51 additions and 4 deletions

View file

@ -1472,6 +1472,10 @@ proc semSubscript(c: PContext, n: PNode, flags: TExprFlags): PNode =
# type parameters: partial generic specialization
n.sons[0] = semSymGenericInstantiation(c, n.sons[0], s)
result = explicitGenericInstantiation(c, n, s)
if result == n:
n.sons[0] = copyTree(result)
else:
n.sons[0] = result
of skMacro, skTemplate:
if efInCall in flags:
# We are processing macroOrTmpl[] in macroOrTmpl[](...) call.