Skip to content

Commit 4472e61

Browse files
committed
Fix typos
1 parent 9b10efd commit 4472e61

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

compiler/src/dotty/tools/dotc/core/TypeComparer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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) || {

compiler/src/dotty/tools/dotc/transform/OverridingPairs.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

compiler/src/dotty/tools/dotc/transform/ResolveSuper.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)