fixes a regression related to the new typeOf parsing
This commit is contained in:
parent
7023fdddff
commit
7720c0aafd
1 changed files with 4 additions and 0 deletions
|
|
@ -1175,6 +1175,10 @@ proc semTypeNode(c: PContext, n: PNode, prev: PType): PType =
|
||||||
result = semAnyRef(c, n, tyPtr, prev)
|
result = semAnyRef(c, n, tyPtr, prev)
|
||||||
elif op.id == ord(wRef):
|
elif op.id == ord(wRef):
|
||||||
result = semAnyRef(c, n, tyRef, prev)
|
result = semAnyRef(c, n, tyRef, prev)
|
||||||
|
elif op.id == ord(wType):
|
||||||
|
checkSonsLen(n, 2)
|
||||||
|
let typExpr = semExprWithType(c, n.sons[1], {efInTypeof})
|
||||||
|
result = typExpr.typ.skipTypes({tyIter})
|
||||||
else:
|
else:
|
||||||
result = semTypeExpr(c, n)
|
result = semTypeExpr(c, n)
|
||||||
of nkWhenStmt:
|
of nkWhenStmt:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue