From 482bec85dd550a0e99a32ebf8021abc3d9e399d8 Mon Sep 17 00:00:00 2001 From: Yoonjae Jeon Date: Thu, 18 Apr 2024 02:46:51 +0900 Subject: [PATCH] Use val for classCtx in superOrThisCallContext --- compiler/src/dotty/tools/dotc/core/Contexts.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/src/dotty/tools/dotc/core/Contexts.scala b/compiler/src/dotty/tools/dotc/core/Contexts.scala index ab6fda68a09e..6824fdb314dc 100644 --- a/compiler/src/dotty/tools/dotc/core/Contexts.scala +++ b/compiler/src/dotty/tools/dotc/core/Contexts.scala @@ -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)