Browse Source

interpreter: don't panic on a nil (*ssa.Call).Object()

pull/6/head
Ayke van Laethem 6 years ago
parent
commit
65358ed3c9
No known key found for this signature in database GPG Key ID: E97FF5335DFDFDED
  1. 2
      interpreter.go

2
interpreter.go

@ -101,7 +101,7 @@ func (p *Program) interpret(instrs []ssa.Instruction, paramKeys []*ssa.Parameter
}
continue
}
if callee.Object().Name() == "init" {
if callee.Object() == nil || callee.Object().Name() == "init" {
return i, nil // arrived at the init#num functions
}
return i, errors.New("todo: init call: " + callee.String())

Loading…
Cancel
Save