Skip to content

Commit

Permalink
Add unapply pattern completion test
Browse files Browse the repository at this point in the history
  • Loading branch information
natsukagami committed Apr 27, 2024
1 parent b8fb81b commit a918d61
Showing 1 changed file with 26 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -623,14 +623,39 @@ class CompletionSuite extends BaseCompletionSuite:
|""".stripMargin
)

@Test def patRecursive =
check(
s"""|object Main {
| Option(List(Option(1))) match {
| case Some(List(None, Som@@))
|}
|""".stripMargin,
"""|Some(value) scala
|Some scala
|Some[A](value: A): Some[A]
|""".stripMargin
)
check(
s"""|object Main {
| Option(Option(1)) match {
| case Some(Som@@)
|}
|""".stripMargin,
"""|Some(value) scala
|Some scala
|Some[A](value: A): Some[A]
|""".stripMargin
)

@Test def pat1 =
check(
s"""|object Main {
| Option(1) match {
| case List(Som@@)
|}
|""".stripMargin,
"""|Some scala
"""|Some(value) scala
|Some scala
|Some[A](value: A): Some[A]
|""".stripMargin
)
Expand Down

0 comments on commit a918d61

Please sign in to comment.