You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In `<a><b/><c/><a>`, a `NodeBuffer` (which extends `ArrayBuffer`) is
used to accumulate the children. The buffer is passed to
`new Elem($buf: _*)`, which only works thanks to the implicit
`collection.Seq[Node] => NodeSeq` declared in scala-xml.
With `-Vprint:typer`:
```scala
scala> <a><b/></a>
[[syntax trees at end of typer]] // rs$line$1
val res0: scala.xml.Elem =
{
new _root_.scala.xml.Elem(null, "a", _root_.scala.xml.Null,
scala.xml.TopScope, false,
{
val $buf: scala.xml.NodeBuffer = new _root_.scala.xml.NodeBuffer()
$buf.&+(
{
{
new _root_.scala.xml.Elem(null, "b", _root_.scala.xml.Null,
scala.xml.TopScope, true, [ : scala.xml.Node]*)
}
}
)
scala.xml.NodeSeq.seqToNodeSeq($buf)
}*
)
}
```
The implicit was not inserted in 2.12 because the varargs parameter of
Elem accepted a `collection.Seq`.
0 commit comments