forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use .superType instead of .underlying
Underlying breaks kinds (the underlying of an AppliedType is a HKTypeLambda). The edited test case was making use of that bug to implement an impossible match type. Indeed, that test is trying to distinguish f[Dummy] (for some f) and Int But there is no way to tell that these two types are disjoint. In fact they are not, since `type F[X] = Any` matches the `f[Dummy]` pattern and overlaps with `Int`.
- Loading branch information
1 parent
4d4296e
commit 51c4f85
Showing
2 changed files
with
6 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Functor[[A >: scala.Nothing <: scala.Any] => scala.collection.immutable.List[A]] | ||
Functor[Const[scala.collection.immutable.List[Dummy]]] | ||
Functor[Const[scala.Int]] | ||
Functor[Id] | ||
Functor[[A >: scala.Nothing <: scala.Any] => scala.Option[A]] | ||
Functor[Const[Dummy]] | ||
Functor[Const[scala.Option[Dummy]]] |