aboutsummaryrefslogtreecommitdiff
path: root/src/test/compile-fail
diff options
context:
space:
mode:
authorTim Chevalier <[email protected]>2011-05-02 13:47:41 -0700
committerGraydon Hoare <[email protected]>2011-05-05 11:26:07 -0700
commit4f892dd9d732f215192f94b28392f26e88f0861e (patch)
tree080318c19494144be62617146984d7bb14478432 /src/test/compile-fail
parentUn-XFAILed not-a-pred in stage0 (it fails correctly) (diff)
downloadrust-4f892dd9d732f215192f94b28392f26e88f0861e.tar.xz
rust-4f892dd9d732f215192f94b28392f26e88f0861e.zip
Check that the operand in a check is a call
In addition, fix bug in fold that was turning asserts into checks. More typechecking still needs to be done.
Diffstat (limited to 'src/test/compile-fail')
-rw-r--r--src/test/compile-fail/not-a-pred-2.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/test/compile-fail/not-a-pred-2.rs b/src/test/compile-fail/not-a-pred-2.rs
new file mode 100644
index 00000000..c8ac4a08
--- /dev/null
+++ b/src/test/compile-fail/not-a-pred-2.rs
@@ -0,0 +1,9 @@
+// -*- rust -*-
+// xfail-boot
+
+// error-pattern: non-predicate
+
+fn main() {
+ check (1 == 2); // should fail to typecheck, as (a == b)
+ // is not a manifest call
+}