I've come across an odd error. I have this larger project that compiles fine with the typical go build
. However when I switch to TinyGo (v0.8.0). I get the above error from this code:
func main() {
_ = lib.NewObject{
Version: lib.Const,
}
}
I changed the names to be less confusing but the symbols are completely identical. lib.Const
is a constant of a lib.Version
. And neither are pointers.
I understand this is a very specific question in the sense that it's in the realm TinyGo. This is more "for the record"... plus I even had to create the "tinygo" tag because this question is so specific. But to add further detail:
- It has been compiling before the above code was added.
- The build command in exact is
tinygo build -target=wasm -o build/out.wasm src/main-wasm.go