Details

      Description

      The following code will give the error in the bug's summary if semicolons are missing

      def main(args: Array[String]): Unit = {
        """
          x
        """ contains 'x'
      
        """
          x
        """ contains 'x'
      }
      

      However, this will compile:

      def main(args: Array[String]): Unit = {
        """
          x
        """ contains 'x'
      
        """
        """ contains 'x'
      }
      
      1. Bug.scala
        0.1 kB
        Eric Torreborre

        Activity

        Hide
        Paul Phillips added a comment -

        Consolidating with SI-4760.

        Show
        Paul Phillips added a comment - Consolidating with SI-4760 .
        Hide
        Commit Message Bot added a comment -

        (extempore in r25459) Fix for a bug in CharArrayReader which made triple quoted strings
        fail to parse sometimes. Note: when the temptation strikes to adjust
        for special cases by letting the regular case happen and subsequently
        attempting to fix the ball of mutation by selectively applying what
        seems like the inverse operation, please consider the possibility that
        this is not the optimal approach. Closes SI-4785, no review.

        Show
        Commit Message Bot added a comment - (extempore in r25459 ) Fix for a bug in CharArrayReader which made triple quoted strings fail to parse sometimes. Note: when the temptation strikes to adjust for special cases by letting the regular case happen and subsequently attempting to fix the ball of mutation by selectively applying what seems like the inverse operation, please consider the possibility that this is not the optimal approach. Closes SI-4785 , no review.
        Hide
        Eric Torreborre added a comment -

        I've add the same issue with the following code and Scala 2.9.1:

        package s99
        
        class Test {
        
          """
          d""" 
        
          """
          s"""
        
        }
        
        Show
        Eric Torreborre added a comment - I've add the same issue with the following code and Scala 2.9.1: package s99 class Test { """ d""" """ s""" }
        Hide
        Eric Torreborre added a comment -

        I'm attaching my exact file because the error disappears sometimes after a copy-and-paste.

        I'm guessing that some line feed characters might be an issue (I'm on windows if that helps and I've used Intellij IDEA to create the file. The encoding is UTF-8 I think)

        Show
        Eric Torreborre added a comment - I'm attaching my exact file because the error disappears sometimes after a copy-and-paste. I'm guessing that some line feed characters might be an issue (I'm on windows if that helps and I've used Intellij IDEA to create the file. The encoding is UTF-8 I think)
        Hide
        Paul Phillips added a comment -

        It's still fixed, just not in 2.9.1. I backported it to 2.9.x. May not be in 2.9.2.

        Show
        Paul Phillips added a comment - It's still fixed, just not in 2.9.1. I backported it to 2.9.x. May not be in 2.9.2.

          People

          • Assignee:
            Paul Phillips
            Reporter:
            Erkki Lindpere
          • Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development