Aladdin - Scala Bugtracking
[#851] project: compiler priority: medium category: bug
submitter assigned to status date submitted
Stephane Martin fixed 2006-11-29 13:56:09.0
subject syntax error with multi-line strings
code
object test {
  def ok1: String = {
    val x = 1
    """ok1"""
  }
  def ok2: String = {
    val x = "0".length
    """ok2"""
  }
  def ok3: String = {
    val x = "0".length
    """ok3
    """//
  }
  def ok4: String = {
    val x = "0".length
    """ok4
    """ + x
  }
  def bad: String = {
    val x = "0".length
    """bad
    """
  }
  def main(args: Array[String]) {
    Console.println(ok1 + ok2 + ok3 + ok4 + bad)
  }
}
what happened
test.scala:21 error: ';' expected but string literal found.
    val x = "0".length
                      ^
what expected no compilation error.
[back to overview]
Changes of this bug report
Martin  edited on  2006-11-29 18:27:07.0