File tree 1 file changed +7
-0
lines changed
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -63,3 +63,10 @@ trait ZA[-X] // ZA[T] ~> ZA { X
63
63
class ZB [- Y ](val put : Y => Unit ) extends ZA [Y ] // ZB[T] ~> ZB { X >: Y; Y >: T }
64
64
class ZC [- Z ](fn : Int => Unit ) extends ZB [Int ](fn) with ZA [Z ] // ZC[T] ~> ZC { X >: (Y & Z); Y >: Int; Z >: T } // error
65
65
class ZD [- Z ](fn : Z => Unit ) extends ZB [Z ](fn) with ZA [Int ] // ZD[T] ~> ZD { X >: (Y & Int); Y >: Z; Z >: T } // error
66
+
67
+ trait Visitor [- X ]
68
+ trait VDelegate [Y ] extends Visitor [Y ]
69
+ class RDelegate1 [Z ] extends VDelegate [Z ] with Visitor [Any ] // X >: Z & X >: Any // error
70
+ class RDelegate2 [Z ] extends Visitor [Any ] with VDelegate [Z ] // X >: Any & X >: Z // error
71
+ class RDelegate3 [Z ] extends VDelegate [Z ] with Visitor [Nothing ] // X >: Z & X >: Nothing // ok
72
+ class RDelegate4 [Z ] extends Visitor [Nothing ] with VDelegate [Z ] // X >: Nothing & X >: Z // ok
You can’t perform that action at this time.
0 commit comments