Skip to content

Commit 91490f4

Browse files
smarterodersky
authored andcommitted
Don't rely on implicit conversion when splicing
Implicit conversions are not normally applied when splicing, it happened to work in this particular case before scala/scala3#8669 because of the peculiar way in which we typed repeated arguments.
1 parent 954bdfb commit 91490f4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/scala/dotty/xml/interpolator/internal/Expand.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ object Expand {
4545
if (elem.children.isEmpty)
4646
'{ new _root_.scala.xml.Elem($prefix, $label, $attributes1, $scope, $empty) }
4747
else
48-
'{ new _root_.scala.xml.Elem($prefix, $label, $attributes1, $scope, $empty, $child: _*) }
48+
'{ new _root_.scala.xml.Elem($prefix, $label, $attributes1, $scope, $empty, _root_.scala.xml.NodeSeq.seqToNodeSeq($child): _*) }
4949
}
5050

5151
private def expandAttributes(attributes: Seq[Attribute])(implicit ctx: XmlContext, qctx: QuoteContext): Expr[scala.xml.MetaData] = {

src/test/scala/dotty/xml/interpolator/ReporterTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import org.junit.Assert._
55

66
class ReporterTest {
77

8-
inline def (inline ctx: StringContext) xml (inline args: (Scope ?=> Any)*)(using Scope) <: Any =
8+
transparent inline def (inline ctx: StringContext) xml (inline args: (Scope ?=> Any)*)(using Scope): Any =
99
${ dotty.xml.interpolator.internal.Macro.implErrors('ctx, 'args, '{implicitly[Scope]}) }
1010

1111
@Test def empty1(): Unit = {

0 commit comments

Comments
 (0)