Skip to content

Commit

Permalink
Add name for the boolean argument
Browse files Browse the repository at this point in the history
  • Loading branch information
noti0na1 committed Mar 23, 2022
1 parent fa132de commit 11baa79
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/Types.scala
Expand Up @@ -1080,7 +1080,7 @@ object Types {
case tp @ MethodType(Nil) => tp.resultType
case _ => tp
}
val overrideCtx = if relaxedCheck && !ctx.mode.is(Mode.RelaxedOverriding) then ctx.relaxedOverrideContext else ctx
val overrideCtx = if relaxedCheck then ctx.relaxedOverrideContext else ctx
inContext(overrideCtx) {
!checkClassInfo && this.isInstanceOf[ClassInfo]
|| (this.widenExpr frozen_<:< that.widenExpr)
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/typer/RefChecks.scala
Expand Up @@ -767,7 +767,7 @@ object RefChecks {
for (mbrd <- self.member(name).alternatives) {
val mbr = mbrd.symbol
val mbrType = mbr.info.asSeenFrom(self, mbr.owner)
if (!mbrType.overrides(mbrd.info, false, matchLoosely = true))
if (!mbrType.overrides(mbrd.info, relaxedCheck = false, matchLoosely = true))
report.errorOrMigrationWarning(
em"""${mbr.showLocated} is not a legal implementation of `$name` in $clazz
| its type $mbrType
Expand Down

0 comments on commit 11baa79

Please sign in to comment.