summaryrefslogtreecommitdiff
path: root/test/files/neg/ambiguous-same.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/neg/ambiguous-same.scala')
-rw-r--r--test/files/neg/ambiguous-same.scala15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/files/neg/ambiguous-same.scala b/test/files/neg/ambiguous-same.scala
new file mode 100644
index 0000000000..50dba71f67
--- /dev/null
+++ b/test/files/neg/ambiguous-same.scala
@@ -0,0 +1,15 @@
+
+// When faced with ambiguities between imports,
+// an attempt is made to see if the imports intend
+// identical types.
+//
+// Here, no attempt is made to notice that x
+// names the same thing.
+//
+object X {
+ val x = 42
+ def f = {
+ import X.x
+ x
+ }
+}