Skip to content

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

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) -> () {
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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