mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-05 03:27:48 +00:00
src/runtime: handle nil map write panics
This commit is contained in:
@@ -32,6 +32,11 @@ func nilPanic() {
|
||||
runtimePanic("nil pointer dereference")
|
||||
}
|
||||
|
||||
// Panic when trying to add an entry to a nil map
|
||||
func nilMapPanic() {
|
||||
runtimePanic("assignment to entry in nil map")
|
||||
}
|
||||
|
||||
// Panic when trying to acces an array or slice out of bounds.
|
||||
func lookupPanic() {
|
||||
runtimePanic("index out of range")
|
||||
|
||||
Reference in New Issue
Block a user