aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorBrian Anderson <[email protected]>2011-04-07 22:12:55 -0400
committerBrian Anderson <[email protected]>2011-04-07 22:13:39 -0400
commita4f8de382a042b664223389db8ffe2b5718b91e8 (patch)
tree456b4bd8e3d8d85dd71a5a99d471c1a790757b98 /src/test
parentMake block results work for generic types (diff)
downloadrust-a4f8de382a042b664223389db8ffe2b5718b91e8.tar.xz
rust-a4f8de382a042b664223389db8ffe2b5718b91e8.zip
Add an XFAILed test for blocks that result in functions
Diffstat (limited to 'src/test')
-rw-r--r--src/test/run-pass/expr-block-fn.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/run-pass/expr-block-fn.rs b/src/test/run-pass/expr-block-fn.rs
new file mode 100644
index 00000000..ab62c1c8
--- /dev/null
+++ b/src/test/run-pass/expr-block-fn.rs
@@ -0,0 +1,15 @@
+// xfail-boot
+// xfail-stage0
+
+fn test_fn() {
+ type t = fn() -> int;
+ fn ten() -> int {
+ ret 10;
+ }
+ let t res = { ten };
+ check (res() == 10);
+}
+
+fn main() {
+ test_fn();
+} \ No newline at end of file