aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/tcpoly_bounds1.scala
blob: 9831e0b991e923f3a0d8951843fa4bd205aa5d91 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class Foo[t[x]<: Tuple2[Int, x]]

//
class MyPair[z](a: Int, b: z) extends Tuple2[Int, z](a,b)

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 MyOrdered[a]
trait MySet[x <: MyOrdered[x]]
trait SetMonad[a <: MyOrdered[a]] extends Monad[MySet, MyOrdered, a]