diff options
author | Simon Schaefer <mail@antoras.de> | 2013-04-04 22:45:34 +0200 |
---|---|---|
committer | Simon Schaefer <mail@antoras.de> | 2013-04-04 23:03:00 +0200 |
commit | dfdbfa73d0cca44109b907b644f1b41120ab4c24 (patch) | |
tree | 1cd342c4d42dfc15fa42e79a5ac549e94747a4fe /test/files/run/t7300.scala | |
parent | cea9e4a9d368965fd37940ef0b7aedd10bec261e (diff) | |
download | scala-dfdbfa73d0cca44109b907b644f1b41120ab4c24.tar.gz scala-dfdbfa73d0cca44109b907b644f1b41120ab4c24.tar.bz2 scala-dfdbfa73d0cca44109b907b644f1b41120ab4c24.zip |
SI-7300 single line comment in multi line comment
This issue was fixed in 3d5c675982 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.
Diffstat (limited to 'test/files/run/t7300.scala')
-rw-r--r-- | test/files/run/t7300.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/run/t7300.scala b/test/files/run/t7300.scala new file mode 100644 index 0000000000..ec841690df --- /dev/null +++ b/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) +} |