fix test
This commit is contained in:
parent
2d7ccf0928
commit
dfae796ac3
1 changed files with 5 additions and 3 deletions
|
|
@ -143,9 +143,6 @@ proc fillBodyObj(c: var TLiftCtx; n, body, x, y: PNode; enforceDefaultOp: bool)
|
|||
fillBody(c, f.typ, body, x.dotField(f), b)
|
||||
of nkNilLit: discard
|
||||
of nkRecCase:
|
||||
let oldfilterDiscriminator = c.filterDiscriminator
|
||||
if c.filterDiscriminator == n[0].sym:
|
||||
c.filterDiscriminator = nil # we have found the case part, proceed as normal
|
||||
# XXX This is only correct for 'attachedSink'!
|
||||
var localEnforceDefaultOp = enforceDefaultOp
|
||||
if c.kind == attachedSink:
|
||||
|
|
@ -159,6 +156,11 @@ proc fillBodyObj(c: var TLiftCtx; n, body, x, y: PNode; enforceDefaultOp: bool)
|
|||
|
||||
# copy the selector:
|
||||
fillBodyObj(c, n[0], body, x, y, enforceDefaultOp = false)
|
||||
|
||||
let oldfilterDiscriminator = c.filterDiscriminator
|
||||
if c.filterDiscriminator == n[0].sym:
|
||||
c.filterDiscriminator = nil # we have found the case part, proceed as normal
|
||||
|
||||
# we need to generate a case statement:
|
||||
var caseStmt = newNodeI(nkCaseStmt, c.info)
|
||||
# XXX generate 'if' that checks same branches
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue