File tree Expand file tree Collapse file tree 2 files changed +3
-8
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -215,7 +215,6 @@ class ScalaSettings extends Settings.SettingGroup with CommonScalaSettings {
215215 val YerasedTerms : Setting [Boolean ] = BooleanSetting (" -Yerased-terms" , " Allows the use of erased terms." )
216216 val YcheckInit : Setting [Boolean ] = BooleanSetting (" -Ycheck-init" , " Check initialization of objects" )
217217 val YrequireTargetName : Setting [Boolean ] = BooleanSetting (" -Yrequire-targetName" , " Warn if an operator is defined without a @targetName annotation" )
218- val YunsoundMatchTypes : Setting [Boolean ] = BooleanSetting (" -Yunsound-match-types" , " Use unsound match type reduction algorithm." )
219218
220219 /** Area-specific debug output */
221220 val YexplainLowlevel : Setting [Boolean ] = BooleanSetting (" -Yexplain-lowlevel" , " When explaining type errors, show types at a lower level." )
Original file line number Diff line number Diff line change @@ -2523,20 +2523,16 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
25232523 case (tp1 : TermRef , tp2 : TermRef ) if isEnumValueOrModule(tp1) && isEnumValueOrModule(tp2) =>
25242524 tp1.termSymbol != tp2.termSymbol
25252525 case (tp1 : TypeProxy , tp2 : TypeProxy ) =>
2526- provablyDisjoint(matchTypeSuperType( tp1) , tp2) || provablyDisjoint(tp1, matchTypeSuperType( tp2) )
2526+ provablyDisjoint(tp1.superType , tp2) || provablyDisjoint(tp1, tp2.superType )
25272527 case (tp1 : TypeProxy , _) =>
2528- provablyDisjoint(matchTypeSuperType( tp1) , tp2)
2528+ provablyDisjoint(tp1.superType , tp2)
25292529 case (_, tp2 : TypeProxy ) =>
2530- provablyDisjoint(tp1, matchTypeSuperType( tp2) )
2530+ provablyDisjoint(tp1, tp2.superType )
25312531 case _ =>
25322532 false
25332533 }
25342534 }
25352535
2536- /** Restores the buggy match type reduction under -Yunsound-match-types. */
2537- private def matchTypeSuperType (tp : TypeProxy ): Type =
2538- if ctx.settings.YunsoundMatchTypes .value then tp.underlying else tp.superType
2539-
25402536 protected def explainingTypeComparer = ExplainingTypeComparer (comparerContext)
25412537 protected def trackingTypeComparer = TrackingTypeComparer (comparerContext)
25422538
You can’t perform that action at this time.
0 commit comments