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/pos/import-rewrite | |
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/pos/import-rewrite')
-rw-r--r-- | tests/pos/import-rewrite/file.scala | 10 | ||||
-rw-r--r-- | tests/pos/import-rewrite/rewrite.scala | 7 |
2 files changed, 17 insertions, 0 deletions
diff --git a/tests/pos/import-rewrite/file.scala b/tests/pos/import-rewrite/file.scala new file mode 100644 index 000000000..e52581e81 --- /dev/null +++ b/tests/pos/import-rewrite/file.scala @@ -0,0 +1,10 @@ +package file + +class File private (val str: String) { + def name: String = "name" +} + +object File { + def apply(str: String): File = new File(str) +} + diff --git a/tests/pos/import-rewrite/rewrite.scala b/tests/pos/import-rewrite/rewrite.scala new file mode 100644 index 000000000..0bda02c5e --- /dev/null +++ b/tests/pos/import-rewrite/rewrite.scala @@ -0,0 +1,7 @@ +package file +import java.io.{File => JFile, _}, StreamTokenizer.{TT_EOF => eof} + +object Main { + Seq("").map(File.apply) + // def name(file: File) = file.name +} |