diff --git a/gnovm/pkg/gnolang/misc.go b/gnovm/pkg/gnolang/misc.go index a05de8c74aa..7f7ce0b3a87 100644 --- a/gnovm/pkg/gnolang/misc.go +++ b/gnovm/pkg/gnolang/misc.go @@ -150,6 +150,10 @@ func isReservedName(n Name) bool { // scans uverse static node for blocknames. (slow) func isUverseName(n Name) bool { + if n == "panic" { + // panic is not in uverse, as it is parsed as its own statement (PanicStmt) + return true + } uverseNames := UverseNode().GetBlockNames() for _, name := range uverseNames { if name == n { diff --git a/gnovm/pkg/gnolang/uverse.go b/gnovm/pkg/gnolang/uverse.go index 880a75396ca..38ccdddea85 100644 --- a/gnovm/pkg/gnolang/uverse.go +++ b/gnovm/pkg/gnolang/uverse.go @@ -928,17 +928,7 @@ func UverseNode() *PackageNode { return }, ) - defNative("panic", - Flds( // params - "err", AnyT(), // args[0] - ), - nil, // results - func(m *Machine) { - arg0 := m.LastBlock().GetParams1() - xv := arg0.Deref() - panic(xv.Sprint(m)) - }, - ) + // NOTE: panic is its own statement type, and is not defined as a function. defNative("print", Flds( // params "xs", Vrd(AnyT()), // args[0]