aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
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