-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix: don't show inferred type for val def bind (#5891)
- Loading branch information
1 parent
d5889c8
commit 02ab6b7
Showing
6 changed files
with
125 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package tests | ||
|
||
import scala.meta.internal.metals.MetalsEnrichments._ | ||
|
||
import munit.TestOptions | ||
|
||
class SkipCommentsSuite extends munit.FunSuite with Assertions { | ||
|
||
check( | ||
"drop-all", | ||
" /* bhjv */ /* bhjbi */", | ||
) | ||
|
||
check( | ||
"between-comments", | ||
" /* bhjv */ @ /* bhjbi */", | ||
Some('@'), | ||
) | ||
|
||
check( | ||
"not-comment", | ||
" /@", | ||
Some('/'), | ||
) | ||
|
||
check( | ||
"tab", | ||
"\t /*cbu * whec*/", | ||
) | ||
|
||
def check( | ||
name: TestOptions, | ||
text: String, | ||
nextChar: Option[Char] = None, | ||
): Unit = | ||
test(name) { | ||
val index = indexAfterSpacesAndComments(text.toCharArray()) | ||
def clue = s"text: $text, index: $index" | ||
nextChar match { | ||
case None => assert(index < 0 || index >= text.size, clue) | ||
case Some(c) => | ||
assertEquals(text.charAt(index), c, clue) | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters