@@ -2,7 +2,7 @@ package dotty.tools.pc.tests.signaturehelp
22
33import dotty .tools .pc .base .BaseSignatureHelpSuite
44
5- import org .junit .Test
5+ import org .junit .{ Ignore , Test }
66
77class SignatureHelpSuite extends BaseSignatureHelpSuite :
88
@@ -253,6 +253,20 @@ class SignatureHelpSuite extends BaseSignatureHelpSuite:
253253 )
254254
255255 @ Test def `tparam5` =
256+ check(
257+ """
258+ |object a {
259+ | List[Int](1).lengthCompare(@@)
260+ |}
261+ """ .stripMargin,
262+ """ |lengthCompare(len: Int): Int
263+ | ^^^^^^^^
264+ |lengthCompare(that: Iterable[?]): Int
265+ |""" .stripMargin
266+ )
267+
268+ @ Ignore (" See if applyCallInfo can still inform on lengthCompare's sig, even if recv is in error" )
269+ @ Test def `tparam5_TypeMismatch` =
256270 check(
257271 """
258272 |object a {
@@ -265,6 +279,31 @@ class SignatureHelpSuite extends BaseSignatureHelpSuite:
265279 |""" .stripMargin
266280 )
267281
282+ @ Test def `tparam5_nonvarargs` =
283+ check(
284+ """
285+ |object a {
286+ | Option[Int](1).getOrElse(@@)
287+ |}
288+ """ .stripMargin,
289+ """ |getOrElse[B >: Int](default: => B): B
290+ | ^^^^^^^^^^^^^
291+ |""" .stripMargin
292+ )
293+
294+ @ Ignore (" Similar to `tparam5_TypeMismatch`" )
295+ @ Test def `tparam5_nonvarargs_TypeMismatch` =
296+ check(
297+ """
298+ |object a {
299+ | Option[String](1).getOrElse(@@)
300+ |}
301+ """ .stripMargin,
302+ """ |getOrElse[B >: String](default: => B): B
303+ | ^^^^^^^^^^^^^
304+ |""" .stripMargin
305+ )
306+
268307 @ Test def `error1` =
269308 check(
270309 """
@@ -547,6 +586,19 @@ class SignatureHelpSuite extends BaseSignatureHelpSuite:
547586 )
548587
549588 @ Test def `last-arg1` =
589+ check(
590+ """
591+ |object A {
592+ | List[Int](1).map(a => @@)
593+ |}
594+ """ .stripMargin,
595+ """ |map[B](f: Int => B): List[B]
596+ | ^^^^^^^^^^^
597+ |""" .stripMargin
598+ )
599+
600+ @ Ignore (" Similar to `tparam5_TypeMismatch`" )
601+ @ Test def `last-arg1_TypeMismatch` =
550602 check(
551603 """
552604 |object A {
0 commit comments