New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cryptic compiler error on using non-int parameters in make #120
Comments
On which target is this an issue? I'm asking because this case should be tested in testdata/slice.go, and I can't reproduce on AVR either. |
Sorry, the target is WebAssembly. |
I managed to reproduce this, with the following code: var x []byte
func main() {
buf := make([]byte, foo())
x = buf
}
func foo() uint64 {
return 3
} Apparently there is a difference between |
And this is a bug on all non-64-bit targets I just tested (avr, wasm, cortex-m). So it's not limited to WebAssembly. |
I think this issue is now fixed in the |
Yes, it should be fixed. |
The following code compiles by mainline Go:
but, when attempting to use that code in TinyGo, it crashes with the following error:
The text was updated successfully, but these errors were encountered: