@@ -2,7 +2,7 @@ package dotty.tools.pc.tests.signaturehelp
2
2
3
3
import dotty .tools .pc .base .BaseSignatureHelpSuite
4
4
5
- import org .junit .Test
5
+ import org .junit .{ Ignore , Test }
6
6
7
7
class SignatureHelpSuite extends BaseSignatureHelpSuite :
8
8
@@ -253,6 +253,20 @@ class SignatureHelpSuite extends BaseSignatureHelpSuite:
253
253
)
254
254
255
255
@ 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` =
256
270
check(
257
271
"""
258
272
|object a {
@@ -265,6 +279,31 @@ class SignatureHelpSuite extends BaseSignatureHelpSuite:
265
279
|""" .stripMargin
266
280
)
267
281
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
+
268
307
@ Test def `error1` =
269
308
check(
270
309
"""
@@ -547,6 +586,19 @@ class SignatureHelpSuite extends BaseSignatureHelpSuite:
547
586
)
548
587
549
588
@ 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` =
550
602
check(
551
603
"""
552
604
|object A {
0 commit comments