Skip to content

"Fatal error: exception Assert_failure("boot/me/trans.ml", 2912, 6)" with return from for-each block #100

Closed
@jorendorff

Description

@jorendorff
// Fatal error: exception Assert_failure("boot/me/trans.ml", 2912, 6)
iter x() -> int { 
}
fn f() -> bool {
    for each (int i in x()) {
        ret true;
    }
    ret false;
}
fn main(vec[str] args) -> () {
}

But if you change the return type to (), different error:

// E:Assembly error: unrecognized quad 41: jmp <none>
iter x() -> int { 
}
fn f() -> () {
    for each (int i in x()) {
        ret;
    }
}
fn main(vec[str] args) -> () {
}

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