flax-lang/flax

Compile time assignments of runtime variables triggers assert

Funkschy opened this issue · 0 comments

If you assign a runtime variable inside a #run directive, it triggers an assert and crashes the compiler

@entry fn main() {
    var i = 0
    #run(
        i = 34 // uwu
    )
}

this results in

compiler assertion at source/fir/interp/interpreter.cpp:1369, cause:
'ret' evaluated to false


there were errors, compilation cannot continue