reproduce code
build.sbt
enablePlugins(SbtTwirl)
scalaVersion := "3.7.0-RC1-bin-20250215-43f8cdb-NIGHTLY"
project/build.properties
project/plugins.sbt
addSbtPlugin("org.playframework.twirl" % "sbt-twirl" % "2.1.0-M2")
src/main/twirl/example.scala.html
@(x: Int)(implicit y: Int)
<p>hello</p>
problem
sbt compile
/src/main/twirl/example.scala.html:3:13: Implicit parameters should be provided with a `using` clause.
[warn] This code can be rewritten automatically under -rewrite -source 3.7-migration.
[warn] To disable the warning, please use the following option:
[warn] "-Wconf:msg=Implicit parameters should be provided with a `using` clause:s"
[warn] <p>hello</p>
[warn] ^
[warn] one warning found
generated code
/**/
def apply/*1.2*/(x: Int)(implicit y: Int):play.twirl.api.HtmlFormat.Appendable = {
_display_ {
{
Seq[Any](format.raw/*2.1*/("""
"""),format.raw/*3.1*/("""<p>hello</p>
"""))
}
}
}
def render(x:Int,y:Int): play.twirl.api.HtmlFormat.Appendable = apply(x)(y)
def f:((Int) => (Int) => play.twirl.api.HtmlFormat.Appendable) = (x) => (y) => apply(x)(y)
def ref: this.type = this
expect
< def render(x:Int,y:Int): play.twirl.api.HtmlFormat.Appendable = apply(x)(y)
---
> def render(x:Int,y:Int): play.twirl.api.HtmlFormat.Appendable = apply(x)(using y)
29c29
< def f:((Int) => (Int) => play.twirl.api.HtmlFormat.Appendable) = (x) => (y) => apply(x)(y)
---
> def f:((Int) => (Int) => play.twirl.api.HtmlFormat.Appendable) = (x) => (y) => apply(x)(using y)
note
reproduce code
build.sbtproject/build.propertiessbt.version=1.10.7project/plugins.sbtsrc/main/twirl/example.scala.htmlproblem
sbt compilegenerated code
expect
note