Merge pull request #4185 from yglukhov/fixup-4066

4066 fixup
This commit is contained in:
Andreas Rumpf
2016-05-20 00:56:07 +02:00

View File

@@ -782,7 +782,7 @@ proc typeSectionFinalPass(c: PContext, n: PNode) =
while x.kind in {nkStmtList, nkStmtListExpr} and x.len > 0:
x = x.lastSon
if x.kind notin {nkObjectTy, nkDistinctTy, nkEnumTy, nkEmpty} and
s.typ.kind notin {tyObject, tyEnum, tyDistinct}:
s.typ.kind notin {tyObject, tyEnum}:
# type aliases are hard:
var t = semTypeNode(c, x, nil)
assert t != nil