This commit is contained in:
Arne Döring
2019-02-23 10:58:40 +01:00
committed by Andreas Rumpf
parent e7878c0d08
commit 30ab7e6bdd

View File

@@ -145,7 +145,7 @@ proc semEnum(c: PContext, n: PNode, prev: PType): PType =
proc semSet(c: PContext, n: PNode, prev: PType): PType =
result = newOrPrevType(tySet, prev, c)
if sonsLen(n) == 2:
if sonsLen(n) == 2 and n.sons[1].kind != nkEmpty:
var base = semTypeNode(c, n.sons[1], nil)
addSonSkipIntLit(result, base)
if base.kind in {tyGenericInst, tyAlias, tySink}: base = lastSon(base)