Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Scala 2.10.0
    • Fix Version/s: Scala 2.11.0-M3
    • Component/s: Misc Compiler
    • Labels:
      None

      Description

      scala> /*//*/ val s = 0
      s: Int = 0
      

      When there is a //* in a multi line comment the compiler treats this not
      as start of a nested comment (I expected that it does).

      scala> /*/*//*/ val s = 0*/*/*/ val p = 0
      p: Int = 0
      

      Here, with nested multi line comments the //* is treated as another
      nested opening multi line comment.

      The behavior is inconsistent. Either single line comments should adopt the behavior of multi line comments or vice versa.

      I brought this to the mailing list but didn't get a comment there: https://groups.google.com/forum/?fromgroups=#!topic/scala-internals/ZdjsTweL31M

        Activity

        Hide
        Simon Schäfer added a comment - - edited

        The behavior seems to be fixed since 2.10.1.

        /*//*/
        is not a valid comment anymore.

        Show
        Simon Schäfer added a comment - - edited The behavior seems to be fixed since 2.10.1. /*//*/ is not a valid comment anymore.
        Hide
        Paul Phillips added a comment -

        I haven't verified, but it's a safe bet this was fixed in 3d5c675982 . A PR with a test case exercising some of the pathological comment combinations discussed in https://github.com/scala-ide/scala-ide/pull/359#issuecomment-15801399 would be much appreciated.

        Show
        Paul Phillips added a comment - I haven't verified, but it's a safe bet this was fixed in 3d5c675982 . A PR with a test case exercising some of the pathological comment combinations discussed in https://github.com/scala-ide/scala-ide/pull/359#issuecomment-15801399 would be much appreciated.
        Hide
        Simon Schäfer added a comment -

        Paul, I'll provide the test cases. PR will follow soon.

        Show
        Simon Schäfer added a comment - Paul, I'll provide the test cases. PR will follow soon.
        Hide
        A. P. Marki added a comment -

        Pathological? I'm not sure, but I think one of the permutations is the emoticon for "boggle eyes" or "wry wtf".

        Show
        A. P. Marki added a comment - Pathological? I'm not sure, but I think one of the permutations is the emoticon for "boggle eyes" or "wry wtf".
        Hide
        Simon Schäfer added a comment -

        I think this one can be closed since the tests are merged too (PR #2355).

        Show
        Simon Schäfer added a comment - I think this one can be closed since the tests are merged too (PR #2355 ).
        Hide
        Simon Schäfer added a comment -

        I close it now because it is fixed.

        Show
        Simon Schäfer added a comment - I close it now because it is fixed.

          People

          • Assignee:
            Paul Phillips
            Reporter:
            Simon Schäfer
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development