aboutsummaryrefslogtreecommitdiff
path: root/tests/pending
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2016-08-21 13:15:55 +0300
committerGitHub <noreply@github.com>2016-08-21 13:15:55 +0300
commitac423a31548cfd0901559513e020331facf66a89 (patch)
tree66e3eb8a6284d426a74b1369ef63f992896b607a /tests/pending
parentf19b6dd8371b6dd7cf45279d97e0fa6702e7365a (diff)
parent3360130593e3949b455b179f244ad76d7aedfe0e (diff)
downloaddotty-ac423a31548cfd0901559513e020331facf66a89.tar.gz
dotty-ac423a31548cfd0901559513e020331facf66a89.tar.bz2
dotty-ac423a31548cfd0901559513e020331facf66a89.zip
Merge pull request #1459 from dotty-staging/tests3
Refinements to auto-tupling
Diffstat (limited to 'tests/pending')
-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
4 files changed, 5 insertions, 90 deletions
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
-}