Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
[Cherry-picked 0b45f44]
  • Loading branch information
rochala authored and WojciechMazur committed Dec 3, 2024
1 parent a355c77 commit be07596
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions compiler/src/dotty/tools/dotc/interactive/Completion.scala
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ object Completion:
// https://github.com/scalameta/metals/blob/main/mtags/src/main/scala/scala/meta/internal/mtags/KeywordWrapper.scala
// https://github.com/com-lihaoyi/Ammonite/blob/73a874173cd337f953a3edc9fb8cb96556638fdd/amm/util/src/main/scala/ammonite/util/Model.scala
private def needsBacktick(s: String) =
val chunks = s.split("_", -1).nn
val chunks = s.split("_", -1)

val validChunks = chunks.zipWithIndex.forall { case (chunk, index) =>
chunk.nn.forall(Chars.isIdentifierPart) ||
Expand Down Expand Up @@ -284,7 +284,6 @@ object Completion:
if denot.isType then denot.symbol.showFullName
else denot.info.widenTermRefExpr.show


def isInNewContext(untpdPath: List[untpd.Tree]): Boolean =
untpdPath match
case _ :: untpd.New(selectOrIdent: (untpd.Select | untpd.Ident)) :: _ => true
Expand Down
2 changes: 1 addition & 1 deletion presentation-compiler/test/dotty/tools/pc/utils/JRE.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ object JRE:

javaVersion match
case Some(version) if version.startsWith("1.8") => 8
case Some(version) => version
case Some(version) => version.toInt // it is better to crash during tests than to run incorrect suite
case None => 8


0 comments on commit be07596

Please sign in to comment.