diff options
author | Martin Odersky <odersky@gmail.com> | 2016-08-26 18:34:03 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-08-26 18:34:03 +0200 |
commit | fcf3bcd7e7358f94846cd90a83efd476ef5023b1 (patch) | |
tree | 1ca7023c21188e83b6c00d7912d0b10fb299f23c /tests | |
parent | 99afc892839ca6209786ccd0dbca2544633be2e8 (diff) | |
download | dotty-fcf3bcd7e7358f94846cd90a83efd476ef5023b1.tar.gz dotty-fcf3bcd7e7358f94846cd90a83efd476ef5023b1.tar.bz2 dotty-fcf3bcd7e7358f94846cd90a83efd476ef5023b1.zip |
Add test file.
Diffstat (limited to 'tests')
-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] +} |