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 | |
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')
-rw-r--r-- | tests/disabled/not-representable/hkt/compiler.error (renamed from tests/pending/hkt/compiler.error) | 0 | ||||
-rw-r--r-- | tests/disabled/not-representable/hkt/hkt.scala (renamed from tests/pending/hkt/hkt.scala) | 3 | ||||
-rw-r--r-- | tests/pending/import-rewrite/compiler.error | 6 | ||||
-rw-r--r-- | tests/pos-scala2/naming-resolution/callsite.scala | 10 | ||||
-rw-r--r-- | tests/pos-scala2/naming-resolution/package.scala | 5 | ||||
-rw-r--r-- | tests/pos/import-rewrite/file.scala (renamed from tests/pending/import-rewrite/file.scala) | 0 | ||||
-rw-r--r-- | tests/pos/import-rewrite/rewrite.scala (renamed from tests/pending/import-rewrite/rewrite.scala) | 0 |
7 files changed, 18 insertions, 6 deletions
diff --git a/tests/pending/hkt/compiler.error b/tests/disabled/not-representable/hkt/compiler.error index b31760891..b31760891 100644 --- a/tests/pending/hkt/compiler.error +++ b/tests/disabled/not-representable/hkt/compiler.error diff --git a/tests/pending/hkt/hkt.scala b/tests/disabled/not-representable/hkt/hkt.scala index 34858cd95..1a9932d73 100644 --- a/tests/pending/hkt/hkt.scala +++ b/tests/disabled/not-representable/hkt/hkt.scala @@ -1,3 +1,6 @@ +// This one is unavoidable. Dotty does not allow several overloaded +// parameterless methods, so it picks the one in the subclass. + import scala.language.higherKinds // Minimal reproduction for: // scala.collection.mutable.ArrayStack.empty[Int] diff --git a/tests/pending/import-rewrite/compiler.error b/tests/pending/import-rewrite/compiler.error deleted file mode 100644 index 0832d33bb..000000000 --- a/tests/pending/import-rewrite/compiler.error +++ /dev/null @@ -1,6 +0,0 @@ -$ scalac tests/pending/import-rewrite/*.scala -$ ./bin/dotc tests/pending/import-rewrite/*.scala -tests/pending/import-rewrite/rewrite.scala:5: error: value apply is not a member of java.io.File.type - Seq("").map(File.apply) - ^ -one error found 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] +} diff --git a/tests/pending/import-rewrite/file.scala b/tests/pos/import-rewrite/file.scala index e52581e81..e52581e81 100644 --- a/tests/pending/import-rewrite/file.scala +++ b/tests/pos/import-rewrite/file.scala diff --git a/tests/pending/import-rewrite/rewrite.scala b/tests/pos/import-rewrite/rewrite.scala index 0bda02c5e..0bda02c5e 100644 --- a/tests/pending/import-rewrite/rewrite.scala +++ b/tests/pos/import-rewrite/rewrite.scala |