onyx-lang / onyx

✨ The compiler and developer toolchain for Onyx
https://onyxlang.io
BSD 2-Clause "Simplified" License
570 stars 20 forks source link

Mishandled `any` generation #146

Open brendanfh opened 5 months ago

brendanfh commented 5 months ago

The following code type checks, but fails to generate the correct WASM instructions.

main :: () {
    x: any = "test"
    printf("x is {}\n", x)
}

This is because any matches any type, but the code generator fails to handle the case where a separate stack allocation for the any data needs to be made.