summaryrefslogblamecommitdiff
path: root/test/files/run/t7319.check
blob: d03ee3a6cf0dc11fa8480d2ea71d0825f514d0c7 (plain) (tree)
1
2
3


                                           




























                                                                                                                                               






                                                                                    
        
             

       
Type in expressions to have them evaluated.
Type :help for more information.

scala> class M[A]
defined class M

scala> implicit def ma0[A](a: A): M[A] = null
warning: there were 1 feature warning(s); re-run with -feature for details
ma0: [A](a: A)M[A]

scala> implicit def ma1[A](a: A): M[A] = null
warning: there were 1 feature warning(s); re-run with -feature for details
ma1: [A](a: A)M[A]

scala> def convert[F[X <: F[X]]](builder: F[_ <: F[_]]) = 0
warning: there were 1 feature warning(s); re-run with -feature for details
convert: [F[X <: F[X]]](builder: F[_ <: F[_]])Int

scala> convert(Some[Int](0))
<console>:12: error: no type parameters for method convert: (builder: F[_ <: F[_]])Int exist so that it can be applied to arguments (Some[Int])
 --- because ---
argument expression's type is not compatible with formal parameter type;
 found   : Some[Int]
 required: ?F forSome { type _$1 <: ?F forSome { type _$2 } }
              convert(Some[Int](0))
              ^
<console>:12: error: type mismatch;
 found   : Some[Int]
 required: F[_ <: F[_]]
              convert(Some[Int](0))
                               ^

scala> Range(1,2).toArray: Seq[_]
<console>:11: error: polymorphic expression cannot be instantiated to expected type;
 found   : [B >: Int]Array[B]
 required: Seq[_]
              Range(1,2).toArray: Seq[_]
                         ^

scala> 0
res2: Int = 0

scala>