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

This commit is contained in:
Ayke van Laethem
2018-09-06 09:47:39 +02:00
parent 094c5561b6
commit 65358ed3c9
+1 -1
View File
@@ -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())