From f25e6783657cde34e25aa8ba105cd43fe9bda787 Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Sun, 1 May 2011 16:29:52 -0400 Subject: Add a regression test for use of unexported fully-qualified paths An unexported foo.baz can't be resolved from inside foo when called as foo.baz instead of just baz. This behavior may want to change eventually. --- src/test/compile-fail/export-fully-qualified.rs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/test/compile-fail/export-fully-qualified.rs diff --git a/src/test/compile-fail/export-fully-qualified.rs b/src/test/compile-fail/export-fully-qualified.rs new file mode 100644 index 00000000..1f62b0a8 --- /dev/null +++ b/src/test/compile-fail/export-fully-qualified.rs @@ -0,0 +1,21 @@ +// xfail-boot +// error-pattern: unresolved name + +// In this test baz isn't resolved when called as foo.baz even though +// it's called from inside foo. This is somewhat surprising and may +// want to change eventually. + +mod foo { + + export bar; + + fn bar() { + foo.baz(); + } + + fn baz() { + } +} + +fn main() { +} \ No newline at end of file -- cgit v1.2.3