mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-05 19:43:44 +00:00
interpreter: don't panic on a nil (*ssa.Call).Object()
This commit is contained in:
+1
-1
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user