Closed
Description
minimized code
trait Foo { def f(x: Int): Any }
inline def f[T <: Foo]: T = (??? match {
case t: T => t.f(10)
}).asInstanceOf[T]
@main def Test = f
Says:
-- Error: ../pg/i3.scala:4:18 --------------------------------------------------
4 | case t: T => t.f(10)
| ^^^^^^^
| undefined: t.f # 1201: TermRef(TermRef(NoPrefix,val t),f) at frontend
one error found
expectation
It should compile.