File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
compiler/src/dotty/tools/dotc/parsing
language-server/test/dotty/tools/languageserver Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -631,7 +631,11 @@ object Scanners {
631
631
nextChar()
632
632
if (ch == '/' ) { skipLine(); finishComment() }
633
633
else if (ch == '*' ) { nextChar(); skipComment(); finishComment() }
634
- else false
634
+ else {
635
+ // This was not a comment, remove the `/` from the buffer
636
+ commentBuf.clear()
637
+ false
638
+ }
635
639
}
636
640
637
641
// Lookahead ---------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -164,6 +164,14 @@ class HoverTest {
164
164
|
165
165
|**Version**
166
166
| - 1.0""" .stripMargin))
167
+ }
167
168
169
+ @ Test def i5482 : Unit = {
170
+ code """ object Test {
171
+ | def bar: Int = 2 / 1
172
+ | /** hello */
173
+ | def ${m1}baz ${m2}: Int = ???
174
+ |} """ .withSource
175
+ .hover(m1 to m2, hoverContent(" Int" , " hello" ))
168
176
}
169
177
}
You can’t perform that action at this time.
0 commit comments