@@ -698,7 +698,7 @@ proc semRecordCase(c: PContext, n: PNode, check: var IntSet, pos: var int,
698
698
father.add a
699
699
700
700
proc semRecordNodeAux(c: PContext, n: PNode, check: var IntSet, pos: var int ,
701
- father: PNode, rectype: PType, hasCaseFields = false ) =
701
+ father: PNode, rectype: PType, hasCaseFields: bool ) =
702
702
if n == nil : return
703
703
case n.kind
704
704
of nkRecWhen:
@@ -727,12 +727,12 @@ proc semRecordNodeAux(c: PContext, n: PNode, check: var IntSet, pos: var int,
727
727
assign(newCheck, check)
728
728
var newPos = pos
729
729
var newf = newNodeI(nkRecList, n.info)
730
- semRecordNodeAux(c, it[idx], newCheck, newPos, newf, rectype)
730
+ semRecordNodeAux(c, it[idx], newCheck, newPos, newf, rectype, hasCaseFields )
731
731
it[idx] = if newf.len == 1 : newf[0 ] else : newf
732
732
if c.inGenericContext > 0 :
733
733
father.add n
734
734
elif branch != nil :
735
- semRecordNodeAux(c, branch, check, pos, father, rectype)
735
+ semRecordNodeAux(c, branch, check, pos, father, rectype, hasCaseFields )
736
736
of nkRecCase:
737
737
semRecordCase(c, n, check, pos, father, rectype)
738
738
of nkNilLit:
@@ -741,7 +741,7 @@ proc semRecordNodeAux(c: PContext, n: PNode, check: var IntSet, pos: var int,
741
741
# attempt to keep the nesting at a sane level:
742
742
var a = if father.kind == nkRecList: father else : copyNode(n)
743
743
for i in 0 ..< n.len:
744
- semRecordNodeAux(c, n[i], check, pos, a, rectype)
744
+ semRecordNodeAux(c, n[i], check, pos, a, rectype, hasCaseFields )
745
745
if a != father: father.add a
746
746
of nkIdentDefs:
747
747
checkMinSonsLen(n, 3 , c.config)
0 commit comments