Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/TypeComparer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1003,7 +1003,7 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
/** True if `tp1` and `tp2` have compatible type constructors and their
* corresponding arguments are subtypes relative to their variance (see `isSubArgs`).
*/
def isMatchingApply(tp1: Type): Boolean = tp1 match {
def isMatchingApply(tp1: Type): Boolean = tp1.widen match {
case tp1 @ AppliedType(tycon1, args1) =>
// We intentionally do not automatically dealias `tycon1` or `tycon2` here.
// `TypeApplications#appliedTo` already takes care of dealiasing type
Expand Down
11 changes: 11 additions & 0 deletions tests/pos/i11499.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
trait Functor[F[_]]

object data {

type OptionT[F[_], A] = F[Option[A]]

def fold[F[_], A, B](value: OptionT[F, A])(f: Functor[F]): F[B] = ???

def cata[F[_], A, B](value: OptionT[F, A])(f: Functor[F]): F[B] =
fold(value)(f) // error
}