From 28987ac892057d5a7a4b753f101868bf7063d9fa Mon Sep 17 00:00:00 2001 From: Hamza Remmal Date: Fri, 15 Aug 2025 18:02:48 +0200 Subject: [PATCH] chore: keep context bounds as implicits in Scala 2 mode --- compiler/src/dotty/tools/dotc/ast/Desugar.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/src/dotty/tools/dotc/ast/Desugar.scala b/compiler/src/dotty/tools/dotc/ast/Desugar.scala index 398b3af607ef..80974c48b670 100644 --- a/compiler/src/dotty/tools/dotc/ast/Desugar.scala +++ b/compiler/src/dotty/tools/dotc/ast/Desugar.scala @@ -339,7 +339,7 @@ object desugar { case Some(param) if param.mods.isOneOf(GivenOrImplicit) => param.mods.flags & GivenOrImplicit case _ => - if Feature.sourceVersion.isAtLeast(`3.6`) then Given + if Feature.sourceVersion.isAtLeast(`3.6`) && !Feature.sourceVersion.isScala2 then Given else Implicit val flags = if isPrimaryConstructor then iflag | LocalParamAccessor else iflag | Param mapParamss(paramss) {