fixes a critical type checking regression

This commit is contained in:
Araq 2019-08-29 12:10:31 +02:00
commit d0e5bd2305

View file

@ -1254,7 +1254,7 @@ proc typeAllowedAux(marker: var IntSet, typ: PType, kind: TSymKind,
of tyProc: of tyProc:
let f = if kind in {skProc, skFunc}: flags+{taNoUntyped} else: flags let f = if kind in {skProc, skFunc}: flags+{taNoUntyped} else: flags
for i in 1 ..< sonsLen(t): for i in 1 ..< sonsLen(t):
result = typeAllowedAux(marker, t.sons[i], skParam, f) result = typeAllowedAux(marker, t.sons[i], skParam, f-{taIsOpenArray})
if result != nil: break if result != nil: break
if result.isNil and t.sons[0] != nil: if result.isNil and t.sons[0] != nil:
result = typeAllowedAux(marker, t.sons[0], skResult, flags) result = typeAllowedAux(marker, t.sons[0], skResult, flags)