-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Milestone
Description
scala> import scala.jdk.CollectionConverters.Ops._
import scala.jdk.CollectionConverters.Ops._
scala> import scala.jdk.FunctionConverters.Ops._
import scala.jdk.FunctionConverters.Ops._
scala> List(1,2,3).asJava
^
error: type mismatch;
found : List[Int]
required: ?{def asJava: ?}
Note that implicit conversions are not applicable because they are ambiguous:
both method SeqHasAsJava in trait AsJavaExtensions of type [A](s: scala.collection.Seq[A])jdk.CollectionConverters.Ops.SeqHasAsJava[A]
and method enrichAsJavaIntUnaryOperator in trait Priority0FunctionExtensions of type [A0](sf: A0 => Int)(implicit evA0: A0 =:= Int)scala.jdk.FunctionWrappers.RichFunction1AsIntUnaryOperator
are possible conversion functions from List[Int] to ?{def asJava: ?}
^
error: value asJava is not a member of List[Int]
Reactions are currently unavailable