Browse files

SI-7300 single line comment in multi line comment

This issue was fixed in 3d5c675 but didn't get any test cases,
which are added by this commit.

Before, a single line comment that occurred before a closing multi
line comment, like in `/*//*/`, was not treated as the beginning of
a nested comment, thus the shown example was parsed as a valid
comment.
  • Loading branch information...
1 parent cea9e4a commit dfdbfa73d0cca44109b907b644f1b41120ab4c24 @sschaef sschaef committed Apr 4, 2013
Showing with 13 additions and 0 deletions.
  1. +2 −0 test/files/run/t7300.check
  2. +11 −0 test/files/run/t7300.scala
View
2 test/files/run/t7300.check
@@ -0,0 +1,2 @@
+2
+2
View
11 test/files/run/t7300.scala
@@ -0,0 +1,11 @@
+object Test extends App {
+ // single line comment in multi line comment
+ /*//*/ val x = 1 */*/
+ val x = 2
+ println(x)
+
+ // single line comment in nested multi line comment
+ /*/*//*/ val y = 1 */*/*/
+ val y = 2
+ println(y)
+}

0 comments on commit dfdbfa7

Please sign in to comment.