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 {
215
215
val YerasedTerms : Setting [Boolean ] = BooleanSetting (" -Yerased-terms" , " Allows the use of erased terms." )
216
216
val YcheckInit : Setting [Boolean ] = BooleanSetting (" -Ycheck-init" , " Check initialization of objects" )
217
217
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." )
219
218
220
219
/** Area-specific debug output */
221
220
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
2523
2523
case (tp1 : TermRef , tp2 : TermRef ) if isEnumValueOrModule(tp1) && isEnumValueOrModule(tp2) =>
2524
2524
tp1.termSymbol != tp2.termSymbol
2525
2525
case (tp1 : TypeProxy , tp2 : TypeProxy ) =>
2526
- provablyDisjoint(matchTypeSuperType( tp1) , tp2) || provablyDisjoint(tp1, matchTypeSuperType( tp2) )
2526
+ provablyDisjoint(tp1.superType , tp2) || provablyDisjoint(tp1, tp2.superType )
2527
2527
case (tp1 : TypeProxy , _) =>
2528
- provablyDisjoint(matchTypeSuperType( tp1) , tp2)
2528
+ provablyDisjoint(tp1.superType , tp2)
2529
2529
case (_, tp2 : TypeProxy ) =>
2530
- provablyDisjoint(tp1, matchTypeSuperType( tp2) )
2530
+ provablyDisjoint(tp1, tp2.superType )
2531
2531
case _ =>
2532
2532
false
2533
2533
}
2534
2534
}
2535
2535
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
-
2540
2536
protected def explainingTypeComparer = ExplainingTypeComparer (comparerContext)
2541
2537
protected def trackingTypeComparer = TrackingTypeComparer (comparerContext)
2542
2538
You can’t perform that action at this time.
0 commit comments