The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

alto (2) [Avatar] Offline
I just started with scala and was facing this issue running the example on page 28 on the scala cli

Welcome to Scala version 2.11.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_71).
Type in expressions to have them evaluated.
Type :help for more information.

scala> val message = "My Life After"
message: String = My Life After

scala> val code = 1
code: Int = 1

scala> val alert = <alert>
| <message priority={code}>{message}</message>
| <date>{ new java.util.Date()}</date>
| </alert>
<console>:10: error: overloaded method constructor UnprefixedAttribute with alternatives:
(key: String,value: Option[Seq[scala.xml.Node]],next: scala.xml.MetaData)scala.xml.UnprefixedAttribute <and>
(key: String,value: String,next: scala.xml.MetaData)scala.xml.UnprefixedAttribute <and>
(key: String,value: Seq[scala.xml.Node],next1: scala.xml.MetaData)scala.xml.UnprefixedAttribute
cannot be applied to (String, Int, scala.xml.MetaData)
<message priority={code}>{message}</message>
It worked when i replace message with test tag. Was wondering what might be the issue