You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importscala.reflect.TypeTestextension [A](self: Any) defbeing(usingTypeTest[self.type, A]) =
self match { caseself: A=>Some(self); case _ =>None }
Output
defbeing[A](self: Any)(using reflect.TypeTest[self.type, A]):Option[A]
2| self match { caseself: A=>Some(self); case _ =>None }
| ^^^^^^^
| the typetestforA cannot be checked at runtime
Expectation
Should compile. The following manual version works:
Minimized code
Output
Expectation
Should compile. The following manual version works:
The text was updated successfully, but these errors were encountered: