Skip to content

Crash related to XML in given #15574

Open
@kavedaa

Description

@kavedaa

Compiler version

3.0.0, 3.1.0, 3.1.2, 3.2.0-RC1

Minimized code

libraryDependencies += "org.scala-lang.modules" %% "scala-xml" % "2.1.0"
trait Renderer[A]:
  def render(x: A): xml.Elem

given Renderer[Int] with
  def render(x: Int) = <td>{ x.toString }</td>

Output (click arrow to expand)

error while checking  extends Renderer[Int] {
  def render(x: Int) =
    {
      {
        new _root_.scala.xml.Elem(null, "td", _root_.scala.xml.Null, $scope,
          false
        ,
          {
            val $buf = new _root_.scala.xml.NodeBuffer()
            $buf.&+(
              {
                x.toString
              }
            )
            $buf
          }*
        )
      }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions