-
Notifications
You must be signed in to change notification settings - Fork 21
Semicolon is not inferred after a XML node sequence literal #9027
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Imported From: https://issues.scala-lang.org/browse/SI-9027?orig=1 |
@retronym said: :paste
// Entering paste mode (ctrl-D to finish)
<a/>
<b/>
<c/>
// Exiting paste mode, now interpreting.
res0: scala.xml.NodeBuffer = ArrayBuffer(<a/>, <b/>, <c/>) |
@som-snytt said: |
@som-snytt said: scala> :pa
// Entering paste mode (ctrl-D to finish)
object X {
val s = <a/>
<b/>
<c/>
println("ack")
}
// Exiting paste mode, now interpreting.
defined object X
scala> X
ack
res0: X.type = X$@17f62e33
scala> object X {
| val s = <a/><b/> <- spaces are harmless?
| println("ack")
| }
defined object X
scala> X
ack
res1: X.type = X$@3da05287 |
@som-snytt said: |
Andrzej Jozwik (ajozwik) said (edited on Dec 4, 2014 8:12:48 AM UTC): The test from repl: scala> :pa
// Entering paste mode (ctrl-D to finish)
object A {
val a = <a/>
val b = <c/><d/>
}
// Exiting paste mode, now interpreting.
defined object A And: scala> :pa
// Entering paste mode (ctrl-D to finish)
object A {
val a = <a/><c/>
val b = <b/>
}
// Exiting paste mode, now interpreting.
<console>:5: error: ';' expected but 'val' found.
val b = <b/> |
@gkossakowski said: |
@gkossakowski said: |
scalac reports error in the following code;
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.The text was updated successfully, but these errors were encountered: