Add tests for blocks that must not have results

This commit is contained in:
Brian Anderson 2011-11-07 12:19:50 -08:00
parent 16bdb85cb4
commit 413d97f8bd
4 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,7 @@
// error-pattern:this block must not have a result
fn main() {
do {
true
} while true;
}

View File

@ -0,0 +1,7 @@
// error-pattern:this block must not have a result
fn main() {
for i in [0] {
true
}
}

View File

@ -0,0 +1,8 @@
// error-pattern:this block must not have a result
resource r(i: int) {
true
}
fn main() {
}

View File

@ -0,0 +1,7 @@
// error-pattern:this block must not have a result
fn main() {
while true {
true
}
}