Skip to content

Commit 6f4ac27

Browse files
committed
Add name for the boolean argument
1 parent 654ec8e commit 6f4ac27

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1080,7 +1080,7 @@ object Types {
10801080
case tp @ MethodType(Nil) => tp.resultType
10811081
case _ => tp
10821082
}
1083-
val overrideCtx = if relaxedCheck && !ctx.mode.is(Mode.RelaxedOverriding) then ctx.relaxedOverrideContext else ctx
1083+
val overrideCtx = if relaxedCheck then ctx.relaxedOverrideContext else ctx
10841084
inContext(overrideCtx) {
10851085
!checkClassInfo && this.isInstanceOf[ClassInfo]
10861086
|| (this.widenExpr frozen_<:< that.widenExpr)

compiler/src/dotty/tools/dotc/typer/RefChecks.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,7 @@ object RefChecks {
767767
for (mbrd <- self.member(name).alternatives) {
768768
val mbr = mbrd.symbol
769769
val mbrType = mbr.info.asSeenFrom(self, mbr.owner)
770-
if (!mbrType.overrides(mbrd.info, false, matchLoosely = true))
770+
if (!mbrType.overrides(mbrd.info, relaxedCheck = false, matchLoosely = true))
771771
report.errorOrMigrationWarning(
772772
em"""${mbr.showLocated} is not a legal implementation of `$name` in $clazz
773773
| its type $mbrType

0 commit comments

Comments
 (0)