aboutsummaryrefslogtreecommitdiff
path: root/src/test/run-pass
diff options
context:
space:
mode:
authorRafael Ávila de Espíndola <[email protected]>2011-01-17 16:17:09 -0500
committerGraydon Hoare <[email protected]>2011-01-17 13:33:13 -0800
commit58490d7fa0a39188915f80e04ef3cf7d6eaf3c90 (patch)
tree1fe802de8ad4ff1a347b5996239b7a301da5c8a8 /src/test/run-pass
parentTeach copy_ty to finish via memcpy of tydesc-provided size. (diff)
downloadrust-58490d7fa0a39188915f80e04ef3cf7d6eaf3c90.tar.xz
rust-58490d7fa0a39188915f80e04ef3cf7d6eaf3c90.zip
Fix the last known (to me) bug in import resolution. We were not properly
dropping the inner part of the environment when an intermediate item resolved in an outer scope.
Diffstat (limited to 'src/test/run-pass')
-rw-r--r--src/test/run-pass/import7.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/run-pass/import7.rs b/src/test/run-pass/import7.rs
new file mode 100644
index 00000000..29915fb1
--- /dev/null
+++ b/src/test/run-pass/import7.rs
@@ -0,0 +1,19 @@
+import bar.baz;
+import foo.zed;
+mod foo {
+ mod zed {
+ fn baz() {
+ log "baz";
+ }
+ }
+}
+mod bar {
+ import zed.baz;
+ mod foo {
+ mod zed {
+ }
+ }
+}
+fn main(vec[str] args) {
+ baz();
+}