object Test { def main(args: Array[String]) { val xml = appleboychild // This is the more likely typo, and the uglier parse. // We could turn it into a } if } does not follow (to // avoid handing }} back to xml) but that is quite ad hoc. // Assuming } for ) after _* would not be not outlandish. // bad brace or paren after _* val {a, z@_*) = xml println("A for "+ a +", ending with "+ z) } }