Pick skParam symbols when resolving type idents (#8720)

Fixes #8357
This commit is contained in:
LemonBoy
2018-08-22 15:49:43 +02:00
committed by Andreas Rumpf
parent d0f4a929e0
commit d94ee75d1c
2 changed files with 11 additions and 1 deletions

View File

@@ -369,7 +369,7 @@ proc semTypeIdent(c: PContext, n: PNode): PSym =
if n.kind == nkSym:
result = getGenSym(c, n.sym)
else:
result = pickSym(c, n, {skType, skGenericParam})
result = pickSym(c, n, {skType, skGenericParam, skParam})
if result.isNil:
result = qualifiedLookUp(c, n, {checkAmbiguity, checkUndeclared})
if result != nil:

10
tests/proc/t8357.nim Normal file
View File

@@ -0,0 +1,10 @@
discard """
output: "Hello"
"""
type
T = ref int
let r = new(string)
r[] = "Hello"
echo r[]