Skip to content

Semicolon is not inferred after a XML node sequence literal #9027

@scabug

Description

@scabug

scalac reports error in the following code;

object Obj {
  val s1 = <a/><b/>
  println("hi")
}

value println is not a member of scala.xml.NodeBuffer possible cause: maybe a semicolon is missing before `value println'?

When <a/></b> is either replaced with <a/> alone or enclosed in parentheses or curly braces, code is compiled without error. Entering the semicolon as suggested also allows compilation to proceed.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions