We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1054624 commit 756ba3dCopy full SHA for 756ba3d
compiler/src/dotty/tools/dotc/core/TypeComparer.scala
@@ -726,10 +726,9 @@ class TypeComparer(initctx: Context) extends DotClass with ConstraintHandling {
726
727
tycon2 match {
728
case param2: TypeParamRef =>
729
- isMatchingApply(tp1) || {
730
- if (canConstrain(param2)) canInstantiate(param2)
731
- else compareLower(bounds(param2), tyconIsTypeRef = false)
732
- }
+ isMatchingApply(tp1) ||
+ canConstrain(param2) && canInstantiate(param2) ||
+ compareLower(bounds(param2), tyconIsTypeRef = false)
733
case tycon2: TypeRef =>
734
isMatchingApply(tp1) ||
735
compareLower(tycon2.info.bounds, tyconIsTypeRef = true)
0 commit comments