diff options
author | Martin Odersky <odersky@gmail.com> | 2016-08-23 15:48:48 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-08-23 15:54:17 +0200 |
commit | 1a538af06323f7d6cd471ae0af39842f26e9e7be (patch) | |
tree | ec621d6d47aee7aaaec8c18f0697afdd118b999a /tests/disabled/not-representable/naming-resolution | |
parent | 76c3e99e33cf25a6ebccc0785212f629a3cda54e (diff) | |
download | dotty-1a538af06323f7d6cd471ae0af39842f26e9e7be.tar.gz dotty-1a538af06323f7d6cd471ae0af39842f26e9e7be.tar.bz2 dotty-1a538af06323f7d6cd471ae0af39842f26e9e7be.zip |
Fix #1457: Three incompatbilities with scalac
Two of these are unavoidable. I moved the tests to diabled/not-representable
and added in each case a comment to the main scala file detailing why there
is a deviation.
The last one (import-rewrite) is fixed.
Diffstat (limited to 'tests/disabled/not-representable/naming-resolution')
3 files changed, 23 insertions, 0 deletions
diff --git a/tests/disabled/not-representable/naming-resolution/callsite.scala b/tests/disabled/not-representable/naming-resolution/callsite.scala new file mode 100644 index 000000000..036803a26 --- /dev/null +++ b/tests/disabled/not-representable/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/disabled/not-representable/naming-resolution/compiler.error b/tests/disabled/not-representable/naming-resolution/compiler.error new file mode 100644 index 000000000..81d6b3cfa --- /dev/null +++ b/tests/disabled/not-representable/naming-resolution/compiler.error @@ -0,0 +1,8 @@ +$ scalac tests/pending/naming-resolution/*.scala +$ ./bin/dotc tests/pending/naming-resolution/*.scala +tests/pending/naming-resolution/callsite.scala:6: error: type mismatch: + found : java.util.stream.Stream[java.nio.file.Path] + required: java.nio.file.Files + def gimmeFiles: Files = Files.list(Paths.get(".")) + ^ +one error found diff --git a/tests/disabled/not-representable/naming-resolution/package.scala b/tests/disabled/not-representable/naming-resolution/package.scala new file mode 100644 index 000000000..f0e26ee95 --- /dev/null +++ b/tests/disabled/not-representable/naming-resolution/package.scala @@ -0,0 +1,5 @@ +package naming + +package object resolution { + type Files = java.util.stream.Stream[java.nio.file.Path] +} |