aboutsummaryrefslogtreecommitdiff
path: root/tests/pending
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pending')
-rw-r--r--tests/pending/hkt/compiler.error6
-rw-r--r--tests/pending/hkt/hkt.scala15
-rw-r--r--tests/pending/import-rewrite/compiler.error6
-rw-r--r--tests/pending/import-rewrite/file.scala10
-rw-r--r--tests/pending/import-rewrite/rewrite.scala7
-rw-r--r--tests/pending/naming-resolution/callsite.scala7
-rw-r--r--tests/pending/naming-resolution/compiler.error8
-rw-r--r--tests/pending/naming-resolution/package.scala5
-rw-r--r--tests/pending/pos/spec-t5545/S_1.scala4
-rw-r--r--tests/pending/pos/spec-t5545/S_2.scala4
-rw-r--r--tests/pending/pos/t1756.scala5
-rw-r--r--tests/pending/pos/t2660.scala25
-rw-r--r--tests/pending/pos/t2913.scala55
-rw-r--r--tests/pending/pos/tryexpr.scala10
-rw-r--r--tests/pending/pos/z1720.scala16
15 files changed, 69 insertions, 114 deletions
diff --git a/tests/pending/hkt/compiler.error b/tests/pending/hkt/compiler.error
new file mode 100644
index 000000000..b31760891
--- /dev/null
+++ b/tests/pending/hkt/compiler.error
@@ -0,0 +1,6 @@
+$ scalac tests/pending/hkt/*.scala
+$ ./bin/dotc tests/pending/hkt/*.scala
+tests/pending/hkt/hkt.scala:14: error: method empty in object Child does not take type parameters
+ Child.empty[Int]
+ ^
+one error found
diff --git a/tests/pending/hkt/hkt.scala b/tests/pending/hkt/hkt.scala
new file mode 100644
index 000000000..34858cd95
--- /dev/null
+++ b/tests/pending/hkt/hkt.scala
@@ -0,0 +1,15 @@
+import scala.language.higherKinds
+// Minimal reproduction for:
+// scala.collection.mutable.ArrayStack.empty[Int]
+
+abstract class Super[C[_]] {
+ def empty[T]: C[T] = ???
+}
+
+class Child[T]
+
+object Child extends Super[Child] {
+ def empty: Child[Nothing] = new Child()
+
+ Child.empty[Int]
+}
diff --git a/tests/pending/import-rewrite/compiler.error b/tests/pending/import-rewrite/compiler.error
new file mode 100644
index 000000000..0832d33bb
--- /dev/null
+++ b/tests/pending/import-rewrite/compiler.error
@@ -0,0 +1,6 @@
+$ 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/pending/import-rewrite/file.scala b/tests/pending/import-rewrite/file.scala
new file mode 100644
index 000000000..e52581e81
--- /dev/null
+++ b/tests/pending/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/pending/import-rewrite/rewrite.scala b/tests/pending/import-rewrite/rewrite.scala
new file mode 100644
index 000000000..0bda02c5e
--- /dev/null
+++ b/tests/pending/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
+}
diff --git a/tests/pending/naming-resolution/callsite.scala b/tests/pending/naming-resolution/callsite.scala
new file mode 100644
index 000000000..b6f2000c9
--- /dev/null
+++ b/tests/pending/naming-resolution/callsite.scala
@@ -0,0 +1,7 @@
+package naming.resolution
+
+import java.nio.file._ // Imports `Files`
+
+object Resolution {
+ def gimmeFiles: Files = Files.list(Paths.get("."))
+}
diff --git a/tests/pending/naming-resolution/compiler.error b/tests/pending/naming-resolution/compiler.error
new file mode 100644
index 000000000..81d6b3cfa
--- /dev/null
+++ b/tests/pending/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/pending/naming-resolution/package.scala b/tests/pending/naming-resolution/package.scala
new file mode 100644
index 000000000..f0e26ee95
--- /dev/null
+++ b/tests/pending/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/pos/spec-t5545/S_1.scala b/tests/pending/pos/spec-t5545/S_1.scala
deleted file mode 100644
index 59ec1fd85..000000000
--- a/tests/pending/pos/spec-t5545/S_1.scala
+++ /dev/null
@@ -1,4 +0,0 @@
-trait F[@specialized(Int) T1, R] {
- def f(v1: T1): R
- def g = v1 => f(v1)
-}
diff --git a/tests/pending/pos/spec-t5545/S_2.scala b/tests/pending/pos/spec-t5545/S_2.scala
deleted file mode 100644
index 59ec1fd85..000000000
--- a/tests/pending/pos/spec-t5545/S_2.scala
+++ /dev/null
@@ -1,4 +0,0 @@
-trait F[@specialized(Int) T1, R] {
- def f(v1: T1): R
- def g = v1 => f(v1)
-}
diff --git a/tests/pending/pos/t1756.scala b/tests/pending/pos/t1756.scala
index 58f56ccb9..34bf273ab 100644
--- a/tests/pending/pos/t1756.scala
+++ b/tests/pending/pos/t1756.scala
@@ -18,6 +18,11 @@ with expected type A with Poly[A]. And no solution is found.
To solve this, I added a fallback scheme similar to implicit arguments:
When an implicit view that adds a method matching given arguments and result
type fails, try again without the result type.
+
+However, troubles are not yet over. We now get an oprhan poly param C when pickling
+and, if typr printer and -Ylog:front is on, an infinite type of the form
+
+ mu x. Ring[LazyRef(x) & A]
*/
trait Ring[T <: Ring[T]] {
def +(that: T): T
diff --git a/tests/pending/pos/t2660.scala b/tests/pending/pos/t2660.scala
deleted file mode 100644
index d42dcc72b..000000000
--- a/tests/pending/pos/t2660.scala
+++ /dev/null
@@ -1,25 +0,0 @@
-package hoho
-
-class G
-
-class H extends G
-
-class A[T](x: T) {
-
- def this(y: G, z: T) = {
- this(z)
- print(1)
- }
-
- def this(z: H, h: T) = {
- this(h)
- print(2)
- }
-}
-
-object T {
- def main(args: Array[String]): Unit = {
- implicit def g2h(g: G): H = new H
- new A(new H, 23)
- }
-}
diff --git a/tests/pending/pos/t2913.scala b/tests/pending/pos/t2913.scala
deleted file mode 100644
index 21700e71a..000000000
--- a/tests/pending/pos/t2913.scala
+++ /dev/null
@@ -1,55 +0,0 @@
-import language.noAutoTupling // try with on and off
-
-class A {
- def foo(a: Int) = 0
-}
-
-class RichA {
- def foo(a: String) = 0
- def foo(a: String, b: String) = 0
- def foo() = 0
-}
-
-object Test {
-
- implicit def AToRichA(a: A): RichA = new RichA
-
- val a = new A
- a.foo()
- a.foo(1)
-
- a.foo("") // Without implicits, a type error regarding invalid argument types is generated at `""`. This is
- // the same position as an argument, so the 'second try' typing with an Implicit View is tried,
- // and AToRichA(a).foo("") is found.
- //
- // My reading of the spec "7.3 Views" is that `a.foo` denotes a member of `a`, so the view should
- // not be triggered.
- //
- // But perhaps the implementation was changed to solve See https://lampsvn.epfl.ch/trac/scala/ticket/1756
-
- a.foo("a", "b") // Without implicits, a type error regarding invalid arity is generated at `foo(<error>"", "")`.
- // Typers#tryTypedApply:3274 only checks if the error is as the same position as `foo`, `"a"`, or `"b"`.
- // None of these po
-}
-
-// t0851 is essentially the same:
-object test1 {
- case class Foo[T,T2](f : (T,T2) => String) extends (((T,T2)) => String){
- def apply(t : T) = (s:T2) => f(t,s)
- def apply(p : (T,T2)) = f(p._1,p._2)
- }
- implicit def g[T](f : (T,String) => String): test1.Foo[T,String] = Foo(f)
- def main(args : Array[String]) : Unit = {
- val f = (x:Int,s:String) => s + x
- println(f(1))
- ()
- }
-}
-object Main {
- def main(args : Array[String]): Unit = {
- val fn = (a : Int, str : String) => "a: " + a + ", str: " + str
- implicit def fx[T](f : (T,String) => String): T => String = (x:T) => f(x,null)
- println(fn(1))
- ()
- }
-}
diff --git a/tests/pending/pos/tryexpr.scala b/tests/pending/pos/tryexpr.scala
deleted file mode 100644
index c6c2febf7..000000000
--- a/tests/pending/pos/tryexpr.scala
+++ /dev/null
@@ -1,10 +0,0 @@
-// stretching more flexible try/catch's legs a bit
-object o {
- try Integer.parseInt("xxxx") catch { case e => 5 }
- try 5
- try try try 10
- try try try 10 catch { case e => 20 } finally 30
- try try try 10 catch { case e => 20 } finally 30 finally 40
- try try try 10 catch { case e => 20 } finally 30 finally 40 finally 50
- try try try 10 finally 50
-}
diff --git a/tests/pending/pos/z1720.scala b/tests/pending/pos/z1720.scala
deleted file mode 100644
index 7394d428c..000000000
--- a/tests/pending/pos/z1720.scala
+++ /dev/null
@@ -1,16 +0,0 @@
-package test
-
-class Thing {
- def info: Info[this.type] = InfoRepository.getInfo(this)
- def info2: Info[this.type] = {
- def self: this.type = this
- InfoRepository.getInfo(self)
- }
-}
-
-trait Info[T]
-case class InfoImpl[T](thing: T) extends Info[T]
-
-object InfoRepository {
- def getInfo(t: Thing): Info[t.type] = InfoImpl(t)
-}