diff options
| author | Tim Chevalier <[email protected]> | 2011-05-04 11:32:06 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2011-05-05 11:26:07 -0700 |
| commit | acf9bd7909a4f6a68d974cabff96c4b72791c201 (patch) | |
| tree | 6b1e5761e7dcdb8625941cf7d02387a554f534ed /src/test/compile-fail/pred-not-bool.rs | |
| parent | Bring back "pred" syntax for writing predicates for check (diff) | |
| download | rust-acf9bd7909a4f6a68d974cabff96c4b72791c201.tar.xz rust-acf9bd7909a4f6a68d974cabff96c4b72791c201.zip | |
Test cases for pred / check stuff
Diffstat (limited to 'src/test/compile-fail/pred-not-bool.rs')
| -rw-r--r-- | src/test/compile-fail/pred-not-bool.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/compile-fail/pred-not-bool.rs b/src/test/compile-fail/pred-not-bool.rs new file mode 100644 index 00000000..c0d19ef2 --- /dev/null +++ b/src/test/compile-fail/pred-not-bool.rs @@ -0,0 +1,13 @@ +// -*- rust -*- + +// error-pattern: mismatched types + +// this checks that a pred with a non-bool return +// type is rejected, even if the pred is never used + +pred bad(int a) -> int { + ret 37; +} + +fn main() { +} |