Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Scala 2.10.0
    • Fix Version/s: Scala 2.10.1
    • Component/s: None

      Description

      class A {
        val html = (null: Any) match {
          case 1 => <xml:group></xml:group>
          case 2 => <p></p>
        }
      }
      

      Compiles in 2.9.2, fails in 2.10 with:

      a.scala:5: error: error during expansion of this match (this is a scalac bug).
      The underlying error was: type mismatch;
       found   : scala.xml.Node with Serializable{def child: Seq[scala.xml.Node]}
       required: scala.xml.Node with Serializable{def child: scala.xml.Node*}
        val html = (null: Any) match {
                               ^
      one error found
      

      Obscure command line option to the rescue: also compiles via

      % scalac -Yeta-expand-keeps-star
      

        Activity

        Show
        Paul Phillips added a comment - https://github.com/scala/scala/pull/1834

          People

          • Assignee:
            Paul Phillips
            Reporter:
            Paul Phillips
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development