aboutsummaryrefslogtreecommitdiffhomepage
path: root/interp/interpreter.go
diff options
context:
space:
mode:
authorMarco Manino <[email protected]>2024-02-13 17:48:19 +0100
committerAyke <[email protected]>2024-05-13 16:49:18 +0200
commitcef2a82c97eeef34fffe72b4cbc60239114dec26 (patch)
treeaa3795eb8cda67c646aebf4d2ccb638c4b717342 /interp/interpreter.go
parent1d9f26cee1f1501b09647186a25ba29aa6a0c58c (diff)
downloadtinygo-cef2a82c97eeef34fffe72b4cbc60239114dec26.tar.gz
tinygo-cef2a82c97eeef34fffe72b4cbc60239114dec26.zip
Checking for methodset existance
Diffstat (limited to 'interp/interpreter.go')
-rw-r--r--interp/interpreter.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/interp/interpreter.go b/interp/interpreter.go
index 605f4d8fc..e0074ba26 100644
--- a/interp/interpreter.go
+++ b/interp/interpreter.go
@@ -427,6 +427,10 @@ func (r *runner) run(fn *function, params []value, parentMem *memoryView, indent
if err != nil {
return nil, mem, r.errorAt(inst, err)
}
+ if typecodePtr.offset() == 0 {
+ locals[inst.localIndex] = literalValue{uint8(0)}
+ break
+ }
typecodePtrOffset, err := typecodePtr.addOffset(-int64(r.pointerSize))
if err != nil {
return nil, mem, r.errorAt(inst, err) // unlikely