Skip to content

Commit b93c337

Browse files
Use val for classCtx in superOrThisCallContext (#20213)
It seems we don't need `var` here.
2 parents 1e520b8 + 482bec8 commit b93c337

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ object Contexts {
437437

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

0 commit comments

Comments
 (0)