scala3
scala3 copied to clipboard
transparent inline implicit conversion fails within inline def
If we remove inline from def baz there is no error.
Compiler version
v3.2.0-RC2
Minimized code
https://scastie.scala-lang.org/S2Dv4bCfThyJGo6F2JQqqg
import language.implicitConversions
trait Exactly:
type Out
val value: Out
object Exactly:
implicit transparent inline def conv[T](value: T): Exactly = Exact[T](value)
type Exact[T] = Exactly { type Out = T }
object Exact:
def apply[T](value_ : T): Exact[T] = new Exactly:
type Out = T
val value = value_
def foo[T](arg: Exact[T]): Unit = {}
inline def baz(arg: Int): Unit = foo(arg)
Output
Found: (arg : Int)
Required: Playground.Exact[T]
where: T is a type variable
Expectation
No error.