// 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
graydon commentedon 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 commentedon Jul 22, 2010
Filed feature-request as #119. This one remains about an un-trapped unimpl case.
graydon commentedon Jul 22, 2010
Add XFAIL'ed test for return-in-iter, call unimpl when we find it. Closed by eaa3561.
Add XFAIL'ed test for return-in-iter, call unimpl when we find it. Cl…
Merge pull request rust-lang#100 from oli-obk/tuple_struct_constructo…
Implement SSE _mm_set* intrinsics (rust-lang#100)
Merge pull request rust-lang#100 from brauliobz/section_the_sections
Follow on to rust-lang#100 to fix breakage
one last breakage related to rust-lang#100
Merge pull request rust-lang#100 from whentze/clean-tests
Merge pull request rust-lang#100 from rust-lang/fix-sat-math
Add missing cast and change some bitcasts to casts to avoid a gimple …
query stack during panicafter ICE #112522Minor tweaks to the documentation (rust-lang#100)
parser: Switch from `ansi_term` to `colored` crate (rust-lang#100)
[SOL] Revert "Update syscalls num (rust-lang#97)" (rust-lang#100)
[SOL] Revert "Update syscalls num (rust-lang#97)" (rust-lang#100)