aboutsummaryrefslogtreecommitdiff
path: root/tests/untried
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-05-30 14:37:40 +0200
committerMartin Odersky <odersky@gmail.com>2014-05-30 14:37:40 +0200
commit05668169eca68bbdc777fbf698f92e256f8e50a9 (patch)
treeda628f1f17fbc30e0183c95546caad4cef2f4039 /tests/untried
parent3b247c34a4c8959b638c61b116635d6c7e80403a (diff)
downloaddotty-05668169eca68bbdc777fbf698f92e256f8e50a9.tar.gz
dotty-05668169eca68bbdc777fbf698f92e256f8e50a9.tar.bz2
dotty-05668169eca68bbdc777fbf698f92e256f8e50a9.zip
Fix of t2504
Another problem where we need to insert an implicit on the result type of complex operation. Two additions: (1) If adapt fails, we now try with a weaker FunProto without result type, thus allowing for an additional implicit cpmversion on the result. (2) An Application in a committable context will not fail if the result type does not match the expected one. The problem will be simply deferred in that case.
Diffstat (limited to 'tests/untried')
-rw-r--r--tests/untried/pos/t2500.scala6
-rwxr-xr-xtests/untried/pos/t2504.scala5
-rw-r--r--tests/untried/pos/t252.scala17
-rwxr-xr-xtests/untried/pos/t2545.scala10
-rw-r--r--tests/untried/pos/t2569/Child.scala9
-rw-r--r--tests/untried/pos/t2569/Parent.java13
-rw-r--r--tests/untried/pos/t2591.scala15
7 files changed, 0 insertions, 75 deletions
diff --git a/tests/untried/pos/t2500.scala b/tests/untried/pos/t2500.scala
deleted file mode 100644
index d0ff99a93..000000000
--- a/tests/untried/pos/t2500.scala
+++ /dev/null
@@ -1,6 +0,0 @@
-object Test {
- import scala.collection._
- ((Map(1 -> "a", 2 -> "b"): collection.Map[Int, String]) map identity[(Int, String)]) : scala.collection.Map[Int,String]
- ((SortedMap(1 -> "a", 2 -> "b"): collection.SortedMap[Int, String]) map identity[(Int, String)]): scala.collection.SortedMap[Int,String]
- ((SortedSet(1, 2): collection.SortedSet[Int]) map identity[Int]): scala.collection.SortedSet[Int]
-}
diff --git a/tests/untried/pos/t2504.scala b/tests/untried/pos/t2504.scala
deleted file mode 100755
index 67f822685..000000000
--- a/tests/untried/pos/t2504.scala
+++ /dev/null
@@ -1,5 +0,0 @@
-object Test {
- val ys: Iterable[_] = Array("abc")
- val xs = Array("abc")
- xs sameElements Array("abc")
-}
diff --git a/tests/untried/pos/t252.scala b/tests/untried/pos/t252.scala
deleted file mode 100644
index d51b5511e..000000000
--- a/tests/untried/pos/t252.scala
+++ /dev/null
@@ -1,17 +0,0 @@
-abstract class Module {}
-
-abstract class T {
- type moduleType <: Module
- val module: moduleType
-}
-
-abstract class Base {
- type mType = Module
- type tType = T { type moduleType <: mType }
-}
-
-abstract class Derived extends Base {
- def f(inputs: List[tType]): Unit = {
- for (t <- inputs; m = t.module) { }
- }
-}
diff --git a/tests/untried/pos/t2545.scala b/tests/untried/pos/t2545.scala
deleted file mode 100755
index 6ad994223..000000000
--- a/tests/untried/pos/t2545.scala
+++ /dev/null
@@ -1,10 +0,0 @@
-trait Frog[T] {
- def hello: T
- def size: Int
- }
-
- trait OnlyWithFrogs {
- self: Frog[_] =>
-
- def sizeStr = size.toString
- }
diff --git a/tests/untried/pos/t2569/Child.scala b/tests/untried/pos/t2569/Child.scala
deleted file mode 100644
index 64f4dc172..000000000
--- a/tests/untried/pos/t2569/Child.scala
+++ /dev/null
@@ -1,9 +0,0 @@
-package varargs
-
- class Child extends Parent {
-
- override def concatenate(strings: String*): String =
- strings map("\"" + _ + "\"") mkString("(", ", ", ")")
-
- }
-
diff --git a/tests/untried/pos/t2569/Parent.java b/tests/untried/pos/t2569/Parent.java
deleted file mode 100644
index 89421becb..000000000
--- a/tests/untried/pos/t2569/Parent.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package varargs;
-
- public class Parent {
-
- public String concatenate(String... strings) {
- StringBuilder builder = new StringBuilder();
- for (String s : strings) {
- builder.append(s);
- }
- return builder.toString();
- }
-
- }
diff --git a/tests/untried/pos/t2591.scala b/tests/untried/pos/t2591.scala
deleted file mode 100644
index 47ae551bf..000000000
--- a/tests/untried/pos/t2591.scala
+++ /dev/null
@@ -1,15 +0,0 @@
-class A
-class B
-
-object Implicits {
- implicit def imp(x: A): Int = 41
- implicit def imp(x: B): Int = 41
-}
-
-object Test {
- // should cause imp to be in scope so that the next expression type checks
- // `import Implicits._` works
- import Implicits.imp
-
- (new A) : Int
-}