aboutsummaryrefslogtreecommitdiff
path: root/tests/pos-scala2/naming-resolution/callsite.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pos-scala2/naming-resolution/callsite.scala')
-rw-r--r--tests/pos-scala2/naming-resolution/callsite.scala10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/pos-scala2/naming-resolution/callsite.scala b/tests/pos-scala2/naming-resolution/callsite.scala
new file mode 100644
index 000000000..036803a26
--- /dev/null
+++ b/tests/pos-scala2/naming-resolution/callsite.scala
@@ -0,0 +1,10 @@
+// This one should be rejected according to spec. The import takes precedence
+// over the type in the same package because the typeis declared in a
+// different compilation unit. scalac does not conform to spec here.
+package naming.resolution
+
+import java.nio.file._ // Imports `Files`
+
+object Resolution {
+ def gimmeFiles: Files = Files.list(Paths.get("."))
+}