aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/test/compile-fail/export-fully-qualified.rs21
1 files changed, 21 insertions, 0 deletions
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