diff options
author | odersky <odersky@gmail.com> | 2016-09-16 22:43:24 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-16 22:43:24 +0300 |
commit | c420b4cc0573e88bf301d4e020e2ad91b26806d0 (patch) | |
tree | c9aef9111054201e228577b3d58b61254bec3558 /tests/pos-scala2 | |
parent | 186f9551da6c7ace243c8e784f8eb5d6355af419 (diff) | |
parent | 062b4133db13bb77369cae81a5ec89e4b2bb6699 (diff) | |
download | dotty-c420b4cc0573e88bf301d4e020e2ad91b26806d0.tar.gz dotty-c420b4cc0573e88bf301d4e020e2ad91b26806d0.tar.bz2 dotty-c420b4cc0573e88bf301d4e020e2ad91b26806d0.zip |
Merge pull request #1465 from dotty-staging/fix-#1457
Fix #1457: Three incompatbilities with scalac
Diffstat (limited to 'tests/pos-scala2')
-rw-r--r-- | tests/pos-scala2/naming-resolution/callsite.scala | 10 | ||||
-rw-r--r-- | tests/pos-scala2/naming-resolution/package.scala | 5 |
2 files changed, 15 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(".")) +} diff --git a/tests/pos-scala2/naming-resolution/package.scala b/tests/pos-scala2/naming-resolution/package.scala new file mode 100644 index 000000000..f0e26ee95 --- /dev/null +++ b/tests/pos-scala2/naming-resolution/package.scala @@ -0,0 +1,5 @@ +package naming + +package object resolution { + type Files = java.util.stream.Stream[java.nio.file.Path] +} |