diff options
author | Marco Manino <[email protected]> | 2024-02-13 17:48:19 +0100 |
---|---|---|
committer | Ayke <[email protected]> | 2024-05-13 16:49:18 +0200 |
commit | cef2a82c97eeef34fffe72b4cbc60239114dec26 (patch) | |
tree | aa3795eb8cda67c646aebf4d2ccb638c4b717342 /interp | |
parent | 1d9f26cee1f1501b09647186a25ba29aa6a0c58c (diff) | |
download | tinygo-cef2a82c97eeef34fffe72b4cbc60239114dec26.tar.gz tinygo-cef2a82c97eeef34fffe72b4cbc60239114dec26.zip |
Checking for methodset existance
Diffstat (limited to 'interp')
-rw-r--r-- | interp/interpreter.go | 4 |
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 |