Skip to content

Compile time assignments of runtime variables triggers assert #45

@Funkschy

Description

@Funkschy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions