aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Anderson <[email protected]>2011-05-01 16:29:52 -0400
committerBrian Anderson <[email protected]>2011-05-01 16:57:36 -0400
commitf25e6783657cde34e25aa8ba105cd43fe9bda787 (patch)
treed0399c78c3e9e5958355126920e6ba8cbbf53b01 /src
parentHide unexported tag variants (diff)
downloadrust-f25e6783657cde34e25aa8ba105cd43fe9bda787.tar.xz
rust-f25e6783657cde34e25aa8ba105cd43fe9bda787.zip
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.
Diffstat (limited to 'src')
-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