aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/tcpoly_bounds1.scala
blob: fc05e18d8c72bc9997c6c04a1262f25e06cffdfd (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]