From 5b5b334c245040726e8fc95b8c448d76aad2ada6 Mon Sep 17 00:00:00 2001 From: Roy Frostig Date: Mon, 28 Jun 2010 21:18:09 -0700 Subject: [PATCH] Testcase (XFAILed) for fn item given as lval. --- src/Makefile | 2 ++ src/test/run-pass/fn-lval.rs | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 src/test/run-pass/fn-lval.rs diff --git a/src/Makefile b/src/Makefile index f2e0a2c4cdd..188a413948b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -319,6 +319,7 @@ TEST_XFAILS_X86 := test/run-pass/mlist-cycle.rs \ test/run-pass/obj-as.rs \ test/run-pass/rec-auto.rs \ test/run-pass/vec-slice.rs \ + test/run-pass/fn-lval.rs \ test/run-pass/generic-fn-infer.rs \ test/run-pass/generic-recursive-tag.rs \ test/run-pass/mutable-alias-vec.rs \ @@ -355,6 +356,7 @@ TEST_XFAILS_LLVM := $(addprefix test/run-pass/, \ else-if.rs \ export-non-interference.rs \ exterior.rs \ + fn-lval.rs \ foreach-put-structured.rs \ foreach-simple-outer-slot.rs \ foreach-simple.rs \ diff --git a/src/test/run-pass/fn-lval.rs b/src/test/run-pass/fn-lval.rs new file mode 100644 index 00000000000..de0d3f48f0e --- /dev/null +++ b/src/test/run-pass/fn-lval.rs @@ -0,0 +1,8 @@ +// -*- rust -*- + +fn foo((fn(int) -> int) f) {} +fn id(int x) -> int { ret x; } + +fn main() { + foo(id); +}