about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRoy Frostig <rfrostig@mozilla.com>2010-06-25 01:26:44 -0700
committerRoy Frostig <rfrostig@mozilla.com>2010-06-25 01:26:44 -0700
commit85a701c8f668fc03e6340682956e7ca7d9cf54bc (patch)
tree4cb2349c7bdd01099566366cc8af1633b1924981 /src
parent241305caab232b04666704dc6853c41312cd283a (diff)
downloadrust-85a701c8f668fc03e6340682956e7ca7d9cf54bc.tar.gz
rust-85a701c8f668fc03e6340682956e7ca7d9cf54bc.zip
Add testcases for item name conflict at the same path level.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile1
-rw-r--r--src/test/compile-fail/item-name-overload.rs8
-rw-r--r--src/test/run-pass/item-name-overload.rs11
3 files changed, 20 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile
index 2c53a30bb2d..0b6315462b0 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -374,6 +374,7 @@ TEST_XFAILS_LLVM := $(addprefix test/run-pass/, \
                       i8-incr.rs \
                       import.rs \
                       inner-module.rs \
+                      item-name-overload.rs \
                       large-records.rs \
                       lazy-and-or.rs \
                       lazychan.rs \
diff --git a/src/test/compile-fail/item-name-overload.rs b/src/test/compile-fail/item-name-overload.rs
new file mode 100644
index 00000000000..06429c763bc
--- /dev/null
+++ b/src/test/compile-fail/item-name-overload.rs
@@ -0,0 +1,8 @@
+// -*- rust -*-
+
+mod foo {
+  fn bar[T](T f) -> int { ret 17; }
+  type bar[U, T] = tup(int, U, T);
+}
+
+fn main() {}
diff --git a/src/test/run-pass/item-name-overload.rs b/src/test/run-pass/item-name-overload.rs
new file mode 100644
index 00000000000..2b0a70e04a3
--- /dev/null
+++ b/src/test/run-pass/item-name-overload.rs
@@ -0,0 +1,11 @@
+// -*- rust -*-
+
+mod foo {
+  fn baz() {}
+}
+
+mod bar {
+  fn baz() {}
+}
+
+fn main() {}