-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix: Catch exception from the compiler when coursier api is on cla…
…sspath We previously fixed another issue connected to this, when no completions would be available because `isPublic` would throw an exception. Now, it turns out we needed to wrap `toSymbols` methods, otherwise we would not get the duplicated symbols (which are also shadowed) Connected to scala/scala3#16175
- Loading branch information
Showing
2 changed files
with
39 additions
and
1 deletion.
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
29 changes: 29 additions & 0 deletions
29
tests/cross/src/test/scala/tests/pc/ShadowingCompletionSuite.scala
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,29 @@ | ||
package tests.pc | ||
|
||
import coursierapi.Dependency | ||
import tests.BaseCompletionSuite | ||
|
||
class ShadowingCompletionSuite extends BaseCompletionSuite { | ||
|
||
override protected def extraDependencies( | ||
scalaVersion: String | ||
): Seq[Dependency] = Seq( | ||
Dependency.of("io.get-coursier", "interface", "1.0.18") | ||
) | ||
|
||
check( | ||
"buffer".tag(IgnoreForScala3CompilerPC), | ||
"""package pkg | ||
|object Main { | ||
| val x = ListBuff@@ | ||
|} | ||
|""".stripMargin, | ||
"""|ListBuffer[A](elems: A*): CC[A] | ||
|ListBuffer(i: Int): A | ||
|ListBuffer - scala.collection.mutable | ||
|""".stripMargin, | ||
compat = Map( | ||
"2" -> "ListBuffer - scala.collection.mutable" | ||
), | ||
) | ||
} |