diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/t696a.check (renamed from test/files/neg/t696.check) | 2 | ||||
-rw-r--r-- | test/files/neg/t696a.flags | 0 | ||||
-rw-r--r-- | test/files/neg/t696a.scala (renamed from test/files/neg/t696.scala) | 0 | ||||
-rw-r--r-- | test/files/neg/t696b.check | 9 | ||||
-rw-r--r-- | test/files/neg/t696b.flags | 1 | ||||
-rw-r--r-- | test/files/neg/t696b.scala | 7 | ||||
-rw-r--r-- | test/files/run/t7291a.check | 1 | ||||
-rw-r--r-- | test/files/run/t7291a.flags | 0 | ||||
-rw-r--r-- | test/files/run/t7291a.scala | 19 | ||||
-rw-r--r-- | test/files/run/t7291b.check | 2 | ||||
-rw-r--r-- | test/files/run/t7291b.flags | 1 | ||||
-rw-r--r-- | test/files/run/t7291b.scala | 19 |
12 files changed, 60 insertions, 1 deletions
diff --git a/test/files/neg/t696.check b/test/files/neg/t696a.check index ac26a864a5..490fc1a571 100644 --- a/test/files/neg/t696.check +++ b/test/files/neg/t696a.check @@ -1,4 +1,4 @@ -t696.scala:4: error: diverging implicit expansion for type TypeUtil0.Type[Any] +t696a.scala:4: error: diverging implicit expansion for type TypeUtil0.Type[Any] starting with method WithType in object TypeUtil0 as[Any](null); ^ diff --git a/test/files/neg/t696a.flags b/test/files/neg/t696a.flags new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/test/files/neg/t696a.flags diff --git a/test/files/neg/t696.scala b/test/files/neg/t696a.scala index a06a32141a..a06a32141a 100644 --- a/test/files/neg/t696.scala +++ b/test/files/neg/t696a.scala diff --git a/test/files/neg/t696b.check b/test/files/neg/t696b.check new file mode 100644 index 0000000000..fcdb5440d8 --- /dev/null +++ b/test/files/neg/t696b.check @@ -0,0 +1,9 @@ +t696b.scala:5: error: diverging implicit expansion for type TypeUtil0.Type[Any] +starting with method WithType in object TypeUtil0 + as[Any](null) + ^ +t696b.scala:6: error: diverging implicit expansion for type TypeUtil0.Type[X] +starting with method WithType in object TypeUtil0 + def foo[X]() = as[X](null) + ^ +two errors found diff --git a/test/files/neg/t696b.flags b/test/files/neg/t696b.flags new file mode 100644 index 0000000000..d564f2b1f8 --- /dev/null +++ b/test/files/neg/t696b.flags @@ -0,0 +1 @@ +-Xdivergence211
\ No newline at end of file diff --git a/test/files/neg/t696b.scala b/test/files/neg/t696b.scala new file mode 100644 index 0000000000..ca76f7ef6c --- /dev/null +++ b/test/files/neg/t696b.scala @@ -0,0 +1,7 @@ +object TypeUtil0 { + trait Type[+T] + implicit def WithType[S,T](implicit tpeS : Type[S], tpeT : Type[T]) : Type[S with T] = null + def as[T](x : Any)(implicit tpe : Type[T]) = null + as[Any](null) + def foo[X]() = as[X](null) +} diff --git a/test/files/run/t7291a.check b/test/files/run/t7291a.check new file mode 100644 index 0000000000..126faa15b4 --- /dev/null +++ b/test/files/run/t7291a.check @@ -0,0 +1 @@ +conjure diff --git a/test/files/run/t7291a.flags b/test/files/run/t7291a.flags new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/test/files/run/t7291a.flags diff --git a/test/files/run/t7291a.scala b/test/files/run/t7291a.scala new file mode 100644 index 0000000000..4b7c4a4184 --- /dev/null +++ b/test/files/run/t7291a.scala @@ -0,0 +1,19 @@ +trait Fooable[T] +object Fooable { + implicit def conjure[T]: Fooable[T] = { + println("conjure") + new Fooable[T]{} + } + +} + +object Test { + implicit def traversable[T, Coll[_] <: Traversable[_]](implicit +elem: Fooable[T]): Fooable[Coll[T]] = { + println("traversable") + new Fooable[Coll[T]]{} + } + def main(args: Array[String]) { + implicitly[Fooable[List[Any]]] + } +} diff --git a/test/files/run/t7291b.check b/test/files/run/t7291b.check new file mode 100644 index 0000000000..c07ba986a3 --- /dev/null +++ b/test/files/run/t7291b.check @@ -0,0 +1,2 @@ +conjure +traversable diff --git a/test/files/run/t7291b.flags b/test/files/run/t7291b.flags new file mode 100644 index 0000000000..d564f2b1f8 --- /dev/null +++ b/test/files/run/t7291b.flags @@ -0,0 +1 @@ +-Xdivergence211
\ No newline at end of file diff --git a/test/files/run/t7291b.scala b/test/files/run/t7291b.scala new file mode 100644 index 0000000000..30c4261a81 --- /dev/null +++ b/test/files/run/t7291b.scala @@ -0,0 +1,19 @@ +trait Fooable[T] +object Fooable { + implicit def conjure[T]: Fooable[T] = { + println("conjure") + new Fooable[T]{} + } + +} + +object Test { + implicit def traversable[T, Coll[_] <: Traversable[_]](implicit +elem: Fooable[T]): Fooable[Coll[T]] = { + println("traversable") + new Fooable[Coll[T]]{} + } + def main(args: Array[String]) { + implicitly[Fooable[List[Any]]] + } +} |