Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

single line comment in multi line comment #7300

Closed
scabug opened this issue Mar 25, 2013 · 7 comments
Closed

single line comment in multi line comment #7300

scabug opened this issue Mar 25, 2013 · 7 comments
Assignees
Milestone

Comments

@scabug
Copy link

scabug commented Mar 25, 2013

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

@scabug
Copy link
Author

scabug commented Mar 25, 2013

Imported From: https://issues.scala-lang.org/browse/SI-7300?orig=1
Reporter: @sschaef
Affected Versions: 2.10.0

@scabug
Copy link
Author

scabug commented Apr 2, 2013

@sschaef said (edited on Apr 2, 2013 1:45:43 PM UTC):
The behavior seems to be fixed since 2.10.1. {code}////{code} is not a valid comment anymore.

@scabug
Copy link
Author

scabug commented Apr 3, 2013

@paulp said:
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 scala-ide/scala-ide#359 (comment) would be much appreciated.

@scabug
Copy link
Author

scabug commented Apr 3, 2013

@sschaef said:
Paul, I'll provide the test cases. PR will follow soon.

@scabug
Copy link
Author

scabug commented Apr 3, 2013

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

@scabug
Copy link
Author

scabug commented Apr 6, 2013

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

@scabug
Copy link
Author

scabug commented Apr 18, 2013

@sschaef said:
I close it now because it is fixed.

@scabug scabug closed this as completed Apr 18, 2013
@scabug scabug added this to the 2.11.0-M3 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants