diff options
author | Martin Odersky <odersky@gmail.com> | 2016-10-10 13:48:46 +0200 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2016-10-12 16:13:49 +0200 |
commit | 9e74d72d3638f70285aff88c53bab6cc57223d16 (patch) | |
tree | f354c07cba6a589474d4a9a6a528ec21e32702b9 /tests/pos | |
parent | d8127d2f0f31913cca7eb60a721b25974b3bfde6 (diff) | |
download | dotty-9e74d72d3638f70285aff88c53bab6cc57223d16.tar.gz dotty-9e74d72d3638f70285aff88c53bab6cc57223d16.tar.bz2 dotty-9e74d72d3638f70285aff88c53bab6cc57223d16.zip |
Update tests to use new PolyType syntax.
Diffstat (limited to 'tests/pos')
-rw-r--r-- | tests/pos/i1181c.scala | 2 | ||||
-rw-r--r-- | tests/pos/nestedLambdas.scala | 4 | ||||
-rw-r--r-- | tests/pos/t2421_delitedsl.scala | 4 | ||||
-rw-r--r-- | tests/pos/tcpoly_bounds1.scala | 2 | ||||
-rw-r--r-- | tests/pos/tcpoly_overloaded.scala | 4 |
5 files changed, 8 insertions, 8 deletions
diff --git a/tests/pos/i1181c.scala b/tests/pos/i1181c.scala index 940629259..58bd99766 100644 --- a/tests/pos/i1181c.scala +++ b/tests/pos/i1181c.scala @@ -4,7 +4,7 @@ trait Bar[DD[_,_]] { val x: DD[Int, Int] } -trait Baz extends Bar[[X,Y] -> Foo[X]] { +trait Baz extends Bar[[X,Y] => Foo[X]] { def foo[M[_,_]](x: M[Int, Int]) = x foo(x) diff --git a/tests/pos/nestedLambdas.scala b/tests/pos/nestedLambdas.scala index 58be1ae2f..2e96fa225 100644 --- a/tests/pos/nestedLambdas.scala +++ b/tests/pos/nestedLambdas.scala @@ -1,8 +1,8 @@ class Test { - type T = [X] -> [Y] -> (X, Y) + type T = [X] => [Y] => (X, Y) - type A[X] = [Y] -> (X, Y) + type A[X] = [Y] => (X, Y) type B[X] = (X, X) diff --git a/tests/pos/t2421_delitedsl.scala b/tests/pos/t2421_delitedsl.scala index 554702a03..22f1ecd85 100644 --- a/tests/pos/t2421_delitedsl.scala +++ b/tests/pos/t2421_delitedsl.scala @@ -15,8 +15,8 @@ trait DeliteDSL { import scala.collection.Traversable class DeliteCollection[T](val xs: Traversable[T]) { // must use existential in bound of P, instead of T itself, because we cannot both have: - // Test.x below: DeliteCollection[T=Int] -> P=DeliteInt <: Forcible[T=Int], as T=Int <~< P=DeliteInt - // Test.xAlready below: DeliteCollection[T=DeliteInt] -> P=DeliteInt <: Forcible[T=DeliteInt], as T=DeliteInt <~< P=DeliteInt + // Test.x below: DeliteCollection[T=Int] => P=DeliteInt <: Forcible[T=Int], as T=Int <~< P=DeliteInt + // Test.xAlready below: DeliteCollection[T=DeliteInt] => P=DeliteInt <: Forcible[T=DeliteInt], as T=DeliteInt <~< P=DeliteInt // this would required DeliteInt <: Forcible[Int] with Forcible[DeliteInt] def headProxy[P <: Forcible[_]](implicit w: T <~< P): P = xs.head diff --git a/tests/pos/tcpoly_bounds1.scala b/tests/pos/tcpoly_bounds1.scala index 9831e0b99..fc05e18d8 100644 --- a/tests/pos/tcpoly_bounds1.scala +++ b/tests/pos/tcpoly_bounds1.scala @@ -7,7 +7,7 @@ object foo extends Foo[MyPair] trait Monad[m[x <: Bound[x]], Bound[x], a] // TODO: variances! -trait ListMonad[a] extends Monad[List, [X] -> Any, a] // Dotty difference: Any is not a legal argument for hk type. +trait ListMonad[a] extends Monad[List, [X] => Any, a] // Dotty difference: Any is not a legal argument for hk type. trait MyOrdered[a] trait MySet[x <: MyOrdered[x]] diff --git a/tests/pos/tcpoly_overloaded.scala b/tests/pos/tcpoly_overloaded.scala index 573eaadcb..f272590f7 100644 --- a/tests/pos/tcpoly_overloaded.scala +++ b/tests/pos/tcpoly_overloaded.scala @@ -11,7 +11,7 @@ trait Monad[T <: Bound[T], MyType[x <: Bound[x]], Bound[_]] { trait Test { def moo: MList[Int] - class MList[T](el: T) extends Monad[T, List, [X] -> Any] { + class MList[T](el: T) extends Monad[T, List, [X] => Any] { def flatMap[S <: RBound[S], RContainer[x <: RBound[x]], RBound[_], Result[x <: RBound[x]] <: Monad[x, RContainer, RBound]] (f: T => Result[S]): Result[S] = sys.error("foo") @@ -21,5 +21,5 @@ trait Test { def flatMap[S] (f: T => List[S], foo: Int): List[S] = sys.error("foo") } - val l: MList[String] = moo.flatMap[String, List, [X] -> Any, MList]((x: Int) => new MList("String")) + val l: MList[String] = moo.flatMap[String, List, [X] => Any, MList]((x: Int) => new MList("String")) } |