From 88f4a938a89e9775bbd807aa078a78a8daa03b69 Mon Sep 17 00:00:00 2001 From: Kacper Korban Date: Mon, 25 Nov 2024 16:38:36 +0100 Subject: [PATCH 1/2] Make context bounds for poly functions a standard feature (#22019) closes #22017 [Cherry-picked e89a66cefb21dd83245748859c3869ab09c06f94] --- compiler/src/dotty/tools/dotc/parsing/Parsers.scala | 2 +- tests/pos/contextbounds-for-poly-functions.scala | 3 --- tests/run/contextbounds-for-poly-functions.scala | 3 --- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala index ef111dbc814c..8befb8073127 100644 --- a/compiler/src/dotty/tools/dotc/parsing/Parsers.scala +++ b/compiler/src/dotty/tools/dotc/parsing/Parsers.scala @@ -3492,7 +3492,7 @@ object Parsers { val hkparams = typeParamClauseOpt(ParamOwner.Hk) val bounds = if paramOwner.acceptsCtxBounds then typeAndCtxBounds(name) - else if in.featureEnabled(Feature.modularity) && paramOwner == ParamOwner.Type then typeAndCtxBounds(name) + else if sourceVersion.isAtLeast(`3.6`) && paramOwner == ParamOwner.Type then typeAndCtxBounds(name) else typeBounds() TypeDef(name, lambdaAbstract(hkparams, bounds)).withMods(mods) } diff --git a/tests/pos/contextbounds-for-poly-functions.scala b/tests/pos/contextbounds-for-poly-functions.scala index 13411a3ad769..49975cf8591d 100644 --- a/tests/pos/contextbounds-for-poly-functions.scala +++ b/tests/pos/contextbounds-for-poly-functions.scala @@ -1,6 +1,3 @@ -import scala.language.experimental.modularity -import scala.language.future - trait Ord[X]: def compare(x: X, y: X): Int type T diff --git a/tests/run/contextbounds-for-poly-functions.scala b/tests/run/contextbounds-for-poly-functions.scala index dcc974fce198..72eed8939fcf 100644 --- a/tests/run/contextbounds-for-poly-functions.scala +++ b/tests/run/contextbounds-for-poly-functions.scala @@ -1,6 +1,3 @@ -import scala.language.experimental.modularity -import scala.language.future - trait Show[X]: def show(x: X): String From 73d9179fbf02685799d31cde7335244b7bd834cf Mon Sep 17 00:00:00 2001 From: Piotr Chabelski Date: Mon, 25 Nov 2024 23:45:03 +0100 Subject: [PATCH 2/2] Update Scala CLI to 1.5.4 (was 1.5.1) & `coursier` to 2.1.18 (was 2.1.13) (#22021) https://github.com/VirtusLab/scala-cli/releases/tag/v1.5.4 https://github.com/coursier/coursier/releases/tag/v2.1.18 cc @WojciechMazur [Cherry-picked 0afabd6e5a506cc833ff01d3000cc8f206ba8255] --- project/Build.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project/Build.scala b/project/Build.scala index c6d808d805db..601b4d6f3c19 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -156,9 +156,9 @@ object Build { val mimaPreviousLTSDottyVersion = "3.3.0" /** Version of Scala CLI to download */ - val scalaCliLauncherVersion = "1.5.1" + val scalaCliLauncherVersion = "1.5.4" /** Version of Coursier to download for initializing the local maven repo of Scala command */ - val coursierJarVersion = "2.1.13" + val coursierJarVersion = "2.1.18" object CompatMode { final val BinaryCompatible = 0