diff --git a/src/test/run-pass/first-class-method.rs b/src/test/run-pass/first-class-method.rs new file mode 100644 index 0000000000000..c9531a08dc530 --- /dev/null +++ b/src/test/run-pass/first-class-method.rs @@ -0,0 +1,11 @@ +// xfail-stage1 +// xfail-stage2 +// xfail-stage3 + +// Test case for issue #758. +obj foo() { fn f() { } } + +fn main() { + let my_foo = foo(); + let f = my_foo.f; +}