Skip to content

Commit

Permalink
test: Add test for completions of matchtype / higher-kinded type
Browse files Browse the repository at this point in the history
  • Loading branch information
tanishiking committed Apr 14, 2022
1 parent 639a166 commit 55f177b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/cross/src/test/scala/tests/pc/CompletionScala3Suite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,25 @@ class CompletionScala3Suite extends BaseCompletionSuite {
|""".stripMargin,
topLines = Some(2)
)

// https://github.com/scalameta/metals/issues/2810
check(
"higher-kinded-match-type".tag(IgnoreScalaVersion.forLessThan("3.1.3-RC2")),
"""|package a
|
|trait Foo[A] {
| def map[B](f: A => B): Foo[B] = ???
|}
|case class Bar[F[_]](bar: F[Int])
|type M[T] = T match {
| case Int => Foo[Int]
|}
|object Test:
| val x = Bar[M](new Foo[Int]{})
| x.bar.m@@
|""".stripMargin,
"""|map[B](f: A => B): Foo[B]
|""".stripMargin,
topLines = Some(1)
)
}

0 comments on commit 55f177b

Please sign in to comment.