about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorJohn Clements <clements@racket-lang.org>2013-06-26 10:37:25 -0700
committerJohn Clements <clements@racket-lang.org>2013-09-06 13:35:07 -0700
commitfb82283a98ed646f4d8560e7288fb5fcf6fb9ffe (patch)
tree93561e0e1ee0e12c277ff3c9d0dcef00472ed271 /src
parent7668fb2c75f53cca9594432da7b88e6030b059e2 (diff)
downloadrust-fb82283a98ed646f4d8560e7288fb5fcf6fb9ffe.tar.gz
rust-fb82283a98ed646f4d8560e7288fb5fcf6fb9ffe.zip
resolve test case
resolve must ignore syntax context when comparing module names
Diffstat (limited to 'src')
-rw-r--r--src/test/run-pass/hygiene-dodging-1.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/run-pass/hygiene-dodging-1.rs b/src/test/run-pass/hygiene-dodging-1.rs
new file mode 100644
index 00000000000..20ffa74e687
--- /dev/null
+++ b/src/test/run-pass/hygiene-dodging-1.rs
@@ -0,0 +1,11 @@
+mod x {
+    pub fn g() -> uint {14}
+}
+
+fn main(){
+    // should *not* shadow the module x:
+    let x = 9;
+    // use it to avoid warnings:
+    x+3;
+    assert_eq!(x::g(),14);
+}