From 46d9c07c0b4aca30f87371043702c624730bdf08 Mon Sep 17 00:00:00 2001 From: Szymon Rodziewicz Date: Tue, 25 Apr 2023 14:12:56 +0200 Subject: [PATCH] Change the order of checks --- compiler/src/dotty/tools/dotc/transform/CheckUnused.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala b/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala index 32afe9c8a1e7..371df57045b4 100644 --- a/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala +++ b/compiler/src/dotty/tools/dotc/transform/CheckUnused.scala @@ -46,9 +46,9 @@ class CheckUnused private (phaseMode: CheckUnused.PhaseMode, suffix: String, _ke override def description: String = CheckUnused.description override def isRunnable(using Context): Boolean = + super.isRunnable && ctx.settings.Wunused.value.nonEmpty && - !ctx.isJava && - super.isRunnable + !ctx.isJava // ========== SETUP ============