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
Since it includes option -source:future, when this is compiled, it warns
$ scala-cli run matchable.scala
Compiling project (Scala 3.3.0, JVM)
[warn] ./matchable.scala:14:10
[warn] pattern selector should be an instance of Matchable,,
[warn] but it has unmatchable type Foo instead
[warn] case Foo(x) =>
[warn] ^^^^^^
Compiled project (Scala 3.3.0, JVM)
foo
Since it works anyway, I think Matchable should probably be added to the Scala 3 sources, but I'm not exactly sure where. Maybe NewEncoding and NewEncodingK should both extend it? Or maybe a new marker trait should be added to NewWrapped that would then extend Matchable on Scala 3?
I'm happy to make a PR once we have a direction.
The text was updated successfully, but these errors were encountered:
Given this scala-cli snippet:
Since it includes option
-source:future
, when this is compiled, it warnsSince it works anyway, I think
Matchable
should probably be added to the Scala 3 sources, but I'm not exactly sure where. MaybeNewEncoding
andNewEncodingK
should both extend it? Or maybe a new marker trait should be added toNewWrapped
that would then extendMatchable
on Scala 3?I'm happy to make a PR once we have a direction.
The text was updated successfully, but these errors were encountered: