File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -769,7 +769,7 @@ class TypeComparer(@constructorOnly initctx: Context) extends ConstraintHandling
769769 // `Mode.RelaxedOverriding` is only enabled when checking Java overriding
770770 // in explicit nulls, and `Null` becomes a bottom type, which allows
771771 // `T | Null` being a subtype of `T`.
772- // A type varibale `T` from Java is translated to `T >: Nothing <: Any`.
772+ // A type variable `T` from Java is translated to `T >: Nothing <: Any`.
773773 // However, `null` can always be a value of `T` for Java side.
774774 // So the best solution here is to let `Null` be bottom type temporarily.
775775 def isNullable (tp : Type ): Boolean = ctx.mode.is(Mode .RelaxedOverriding ) || {
Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ object OverridingPairs:
217217 )
218218 else
219219 // releaxed override check for explicit nulls if one of the symbols is Java defined,
220- // force `Null` being a bottom types during override checking.
220+ // force `Null` to be a bottom type during override checking.
221221 val overrideCtx = if ctx.explicitNulls && (member.is(JavaDefined ) || other.is(JavaDefined ))
222222 then ctx.retractMode(Mode .SafeNulls ).addMode(Mode .RelaxedOverriding ) else ctx
223223 member.name.is(DefaultGetterName ) // default getters are not checked for compatibility
Original file line number Diff line number Diff line change @@ -112,8 +112,8 @@ object ResolveSuper {
112112 val otherTp = other.asSeenFrom(base.typeRef).info
113113 val accTp = acc.asSeenFrom(base.typeRef).info
114114 // Since the super class can be Java defined,
115- // we use releaxed overriding check for explicit nulls if one of the symbols is Java defined.
116- // This forces `Null` being a bottom type during override checking.
115+ // we use relaxed overriding check for explicit nulls if one of the symbols is Java defined.
116+ // This forces `Null` to be a bottom type during override checking.
117117 val overrideCtx = if ctx.explicitNulls && (sym.is(JavaDefined ) || acc.is(JavaDefined ))
118118 then ctx.retractMode(Mode .SafeNulls ).addMode(Mode .RelaxedOverriding ) else ctx
119119 if ! otherTp.overrides(accTp, matchLoosely = true )(using overrideCtx) then
You can’t perform that action at this time.
0 commit comments