Add an XFAILed test for treating alts as expressions
This commit is contained in:
parent
dcf04ffbad
commit
efb738153c
31
src/test/run-pass/expr-alt.rs
Normal file
31
src/test/run-pass/expr-alt.rs
Normal file
@ -0,0 +1,31 @@
|
||||
// xfail-boot
|
||||
// xfail-stage0
|
||||
// -*- rust -*-
|
||||
|
||||
// Tests for using alt as an expression
|
||||
|
||||
fn test() {
|
||||
let bool res = alt (true) {
|
||||
case (true) {
|
||||
true
|
||||
}
|
||||
case (false) {
|
||||
false
|
||||
}
|
||||
};
|
||||
check (res);
|
||||
|
||||
res = alt(false) {
|
||||
case (true) {
|
||||
false
|
||||
}
|
||||
case (false) {
|
||||
true
|
||||
}
|
||||
};
|
||||
check (res);
|
||||
}
|
||||
|
||||
fn main() {
|
||||
test();
|
||||
}
|
Loading…
Reference in New Issue
Block a user