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
This is intentionally not supported: we only allow wildcards on class types (because anything else would be equivalent to existential types which we don't support), some alternatives you could use:
wrap the type in a class: class WatchHandler[T](f: Function2[T, T, scala.Unit]
not sure if it would make sense here, but one could use the new-in-dotty polymorphic function types: val handlers: Seq[[T] => () => WatchHandler[T]] = Nil, cf [Proof of concept] Polymorphic function types #4672
Minimized code
Output
Expectation
In Scala 2 this compiles. I tried replacing with
?
instead, but got the same error.The text was updated successfully, but these errors were encountered: