-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
area:implicitsrelated to implicitsrelated to implicitsarea:implicits:implicitConversionIssues tied with scala.language.implicitConversionsIssues tied with scala.language.implicitConversionsitype:bugitype:question
Description
Sometimes it is crucial to convert types without evaluating the value.
For example, like this:
implicit def toB[R](x: => A[R]): B[R] = B(myFun(x))There exists no equivalent given statement, which I wish would.
If I define a given [R]: Conversion[A[R], B[R]], the apply function has to have type A[R] as parameter, disallowing type => A[R]. So currently I am forced to use the implicit def, which is at odds with modern
coding style that uses given.
Metadata
Metadata
Assignees
Labels
area:implicitsrelated to implicitsrelated to implicitsarea:implicits:implicitConversionIssues tied with scala.language.implicitConversionsIssues tied with scala.language.implicitConversionsitype:bugitype:question