From 9ea3490b76755907282f0c3196dd40d34fe985dc Mon Sep 17 00:00:00 2001 From: Som Snytt Date: Wed, 30 Apr 2025 07:43:25 -0700 Subject: [PATCH] REPL wrapper is not ctx.outer [Cherry-picked c5d5214f9b0955574d594abe256762932ed7589e] --- compiler/src/dotty/tools/dotc/transform/CheckUnused.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala b/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala index e235bd6befb7..552732445d5e 100644 --- a/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala +++ b/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala @@ -456,7 +456,7 @@ object CheckUnused: if inliners == 0 && languageImport(imp.expr).isEmpty && !imp.isGeneratedByEnum - && !ctx.outer.owner.name.isReplWrapperName + && !ctx.owner.name.isReplWrapperName then imps.put(imp, ()) case tree: Bind =>