Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
jorendorff opened this issue Jul 10, 2010 · 3 comments

Comments

@jorendorff
Copy link
Contributor

// 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) -> () {
}
@graydon
Copy link
Contributor

graydon commented Jul 12, 2010

There's no support for breaking out of a foreach loop yet. The call protocol associated with put statements needs to understand that the inner block can return with different status indicators (returning from controlling frame, breaking loop, continuing loop) and propagate these outwards as needed. It's a bit of a task, but you're welcome to take it!

@graydon
Copy link
Contributor

graydon commented Jul 22, 2010

Filed feature-request as #119. This one remains about an un-trapped unimpl case.

@graydon
Copy link
Contributor

graydon commented Jul 22, 2010

Add XFAIL'ed test for return-in-iter, call unimpl when we find it. Closed by eaa3561.

oli-obk pushed a commit to oli-obk/rust that referenced this issue Jul 19, 2017
…r_as_fn

allow the use of tuple struct constructors as functions
kazcw pushed a commit to kazcw/rust that referenced this issue Oct 23, 2018
* Add _mm_set_ss

* Add _mm_set1_ps and _mm_set_ps1

* Add _mm_set_ps

* Add _mm_setr_ps

* Add _mm_setzero_ps

* Fix _mm_setr_ps instr test on x86

* Sidestep black_box ABI issue on i586
dlrobertson pushed a commit to dlrobertson/rust that referenced this issue Nov 29, 2018
Divide items and expressions into sections
dlrobertson pushed a commit to dlrobertson/rust that referenced this issue Nov 29, 2018
dlrobertson pushed a commit to dlrobertson/rust that referenced this issue Nov 29, 2018
eddyb pushed a commit to eddyb/rust that referenced this issue Jun 30, 2020
Make `tests/full.rs` no longer use `git diff`
bors pushed a commit to rust-lang-ci/rust that referenced this issue Oct 1, 2021
Fix sat math at the cost of Simd{U,I}128 for now
bjorn3 pushed a commit to bjorn3/rust that referenced this issue Dec 31, 2021
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants