diff --git a/gnovm/pkg/gnolang/preprocess.go b/gnovm/pkg/gnolang/preprocess.go index 8951c2c04cf..d47067854ca 100644 --- a/gnovm/pkg/gnolang/preprocess.go +++ b/gnovm/pkg/gnolang/preprocess.go @@ -4404,7 +4404,7 @@ func tryPredefine(store Store, last BlockNode, d Decl) (un Name) { if fv.body == nil && store != nil { fv.nativeBody = store.GetNative(pkg.PkgPath, d.Name) if fv.nativeBody == nil { - panic(fmt.Sprintf("function %s does not have a body but is not natively defined", d.Name)) + panic(fmt.Sprintf("function %s does not have a body but is not natively defined (did you build after pulling from the repository?)", d.Name)) } fv.NativePkg = pkg.PkgPath fv.NativeName = d.Name diff --git a/gnovm/tests/files/native0.gno b/gnovm/tests/files/native0.gno new file mode 100644 index 00000000000..a6b8f3e67bf --- /dev/null +++ b/gnovm/tests/files/native0.gno @@ -0,0 +1,10 @@ +package main + +func invalidNative() string + +func main() { + println(invalidNative()) +} + +// Error: +// main/files/native0.gno:3:1: function invalidNative does not have a body but is not natively defined (did you build after pulling from the repository?)