Skip to content

Commit

Permalink
Backport "Use val for classCtx in superOrThisCallContext" to LTS (#21077
Browse files Browse the repository at this point in the history
)

Backports #20213 to the LTS branch.

PR submitted by the release tooling.
[skip ci]
  • Loading branch information
WojciechMazur authored Jul 6, 2024
2 parents ab8df25 + 7b065d0 commit db05d86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/core/Contexts.scala
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ object Contexts {

/** The super- or this-call context with given owner and locals. */
private def superOrThisCallContext(owner: Symbol, locals: Scope): FreshContext = {
var classCtx = outersIterator.dropWhile(!_.isClassDefContext).next()
val classCtx = outersIterator.dropWhile(!_.isClassDefContext).next()
classCtx.outer.fresh.setOwner(owner)
.setScope(locals)
.setMode(classCtx.mode)
Expand Down

0 comments on commit db05d86

Please sign in to comment.