2012-03-05 18:27:27 -06:00
|
|
|
// error-pattern:unsatisfied precondition
|
Support all expression forms in typestate
Added support for self_method, cont, chan, port, recv, send, be,
do_while, spawn, and ext; handled break and cont correctly.
(However, there are no non-xfailed test cases for ext or spawn in
stage0 currently.)
Although the standard library compiles and all test cases pass with
typestate enabled, I left typestate checking disabled as rustc
terminates abnormally when building the standard library if so,
even though it does generate code correctly.
2011-04-21 19:39:04 -05:00
|
|
|
|
|
|
|
fn foo() -> int {
|
2011-07-27 07:19:39 -05:00
|
|
|
let x: int;
|
|
|
|
let i: int;
|
Support all expression forms in typestate
Added support for self_method, cont, chan, port, recv, send, be,
do_while, spawn, and ext; handled break and cont correctly.
(However, there are no non-xfailed test cases for ext or spawn in
stage0 currently.)
Although the standard library compiles and all test cases pass with
typestate enabled, I left typestate checking disabled as rustc
terminates abnormally when building the standard library if so,
even though it does generate code correctly.
2011-04-21 19:39:04 -05:00
|
|
|
|
2011-07-27 07:19:39 -05:00
|
|
|
do { i = 0; break; x = 0; } while 1 != 2
|
Support all expression forms in typestate
Added support for self_method, cont, chan, port, recv, send, be,
do_while, spawn, and ext; handled break and cont correctly.
(However, there are no non-xfailed test cases for ext or spawn in
stage0 currently.)
Although the standard library compiles and all test cases pass with
typestate enabled, I left typestate checking disabled as rustc
terminates abnormally when building the standard library if so,
even though it does generate code correctly.
2011-04-21 19:39:04 -05:00
|
|
|
|
2011-12-22 19:53:53 -06:00
|
|
|
log(debug, x);
|
Support all expression forms in typestate
Added support for self_method, cont, chan, port, recv, send, be,
do_while, spawn, and ext; handled break and cont correctly.
(However, there are no non-xfailed test cases for ext or spawn in
stage0 currently.)
Although the standard library compiles and all test cases pass with
typestate enabled, I left typestate checking disabled as rustc
terminates abnormally when building the standard library if so,
even though it does generate code correctly.
2011-04-21 19:39:04 -05:00
|
|
|
|
2011-07-27 07:19:39 -05:00
|
|
|
ret 17;
|
Support all expression forms in typestate
Added support for self_method, cont, chan, port, recv, send, be,
do_while, spawn, and ext; handled break and cont correctly.
(However, there are no non-xfailed test cases for ext or spawn in
stage0 currently.)
Although the standard library compiles and all test cases pass with
typestate enabled, I left typestate checking disabled as rustc
terminates abnormally when building the standard library if so,
even though it does generate code correctly.
2011-04-21 19:39:04 -05:00
|
|
|
}
|
|
|
|
|
2011-12-22 19:53:53 -06:00
|
|
|
fn main() { log(debug, foo()); }
|