about summary refs log tree commit diff
path: root/src/test/compile-fail
diff options
context:
space:
mode:
authorRafael Ávila de Espíndola <respindola@mozilla.com>2011-01-14 17:20:14 -0500
committerRafael Ávila de Espíndola <respindola@mozilla.com>2011-01-14 17:34:00 -0500
commit5b9eda4a41a410ffd8529a80c19f499ff856e07f (patch)
tree8643c5269b17344e41e66f1ee7658c39ebc2aa7d /src/test/compile-fail
parentc8a2c44a8e67d05204bac2850852f7fec0d23332 (diff)
downloadrust-5b9eda4a41a410ffd8529a80c19f499ff856e07f.tar.gz
rust-5b9eda4a41a410ffd8529a80c19f499ff856e07f.zip
Fix the import handling in "complex" cases. When looking a.b.c and 'a' is a
module, we should look for 'b' *just* in the module 'a' and then continue
resolving b.c in the environment created by updating *with* a.

Still not 100% correct, but getting there.
Diffstat (limited to 'src/test/compile-fail')
-rw-r--r--src/test/compile-fail/import4.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/compile-fail/import4.rs b/src/test/compile-fail/import4.rs
new file mode 100644
index 00000000000..f769d6d3966
--- /dev/null
+++ b/src/test/compile-fail/import4.rs
@@ -0,0 +1,8 @@
+// error-pattern: recursive import
+
+import zed.bar;
+import bar.zed;
+
+fn main(vec[str] args) {
+  log "loop";
+}