compiler: do not traverse defer
function literals twice
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
8dcfb19a1c
commit
ed43b75631
3 changed files with 31 additions and 3 deletions
|
@ -33,7 +33,7 @@ func checkCallCount(t *testing.T, src string, expectedCall, expectedInitSlot, ex
|
|||
actualCall++
|
||||
case opcode.INITSLOT:
|
||||
actualInitSlot++
|
||||
if ctx.IP() == mainStart {
|
||||
if ctx.IP() == mainStart && expectedLocalsMain >= 0 {
|
||||
require.Equal(t, expectedLocalsMain, int(param[0]))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue