@@ -758,8 +758,8 @@ class DocumentHighlightSuite extends BaseDocumentHighlightSuite:
758758 | }
759759 |}""" .stripMargin
760760 )
761-
762- @ Test def `for-comp-map` =
761+
762+ @ Test def `for-comp-map` =
763763 check(
764764 """ |object Main {
765765 | val x = List(1).<<m@@ap>>(_ + 1)
@@ -770,7 +770,7 @@ class DocumentHighlightSuite extends BaseDocumentHighlightSuite:
770770 |""" .stripMargin,
771771 )
772772
773- @ Test def `for-comp-map1` =
773+ @ Test def `for-comp-map1` =
774774 check(
775775 """ |object Main {
776776 | val x = List(1).<<m@@ap>>(_ + 1)
@@ -782,7 +782,7 @@ class DocumentHighlightSuite extends BaseDocumentHighlightSuite:
782782 |""" .stripMargin,
783783 )
784784
785- @ Test def `for-comp-foreach` =
785+ @ Test def `for-comp-foreach` =
786786 check(
787787 """ |object Main {
788788 | val x = List(1).<<for@@each>>(_ => ())
@@ -793,7 +793,7 @@ class DocumentHighlightSuite extends BaseDocumentHighlightSuite:
793793 |""" .stripMargin,
794794 )
795795
796- @ Test def `for-comp-withFilter` =
796+ @ Test def `for-comp-withFilter` =
797797 check(
798798 """ |object Main {
799799 | val x = List(1).<<with@@Filter>>(_ => true)
@@ -805,7 +805,7 @@ class DocumentHighlightSuite extends BaseDocumentHighlightSuite:
805805 |""" .stripMargin,
806806 )
807807
808- @ Test def `for-comp-withFilter1` =
808+ @ Test def `for-comp-withFilter1` =
809809 check(
810810 """ |object Main {
811811 | val x = List(1).withFilter(_ => true).<<m@@ap>>(_ + 1)
@@ -817,7 +817,7 @@ class DocumentHighlightSuite extends BaseDocumentHighlightSuite:
817817 |""" .stripMargin,
818818 )
819819
820- @ Test def `for-comp-flatMap1` =
820+ @ Test def `for-comp-flatMap1` =
821821 check(
822822 """ |object Main {
823823 | val x = List(1).<<flat@@Map>>(_ => List(1))
@@ -830,7 +830,7 @@ class DocumentHighlightSuite extends BaseDocumentHighlightSuite:
830830 |""" .stripMargin,
831831 )
832832
833- @ Test def `for-comp-flatMap2` =
833+ @ Test def `for-comp-flatMap2` =
834834 check(
835835 """ |object Main {
836836 | val x = List(1).withFilter(_ => true).<<flat@@Map>>(_ => List(1))
@@ -1102,3 +1102,44 @@ class DocumentHighlightSuite extends BaseDocumentHighlightSuite:
11021102 |val alpha = MyOption.<<MySome>>(1)
11031103 |""" .stripMargin,
11041104 )
1105+
1106+ @ Test def `type-params-in-enum` =
1107+ check(
1108+ """ |enum MyOption[+<<A@@A>>]:
1109+ | case MySome(value: <<AA>>)
1110+ | case MyNone
1111+ |""" .stripMargin,
1112+ )
1113+
1114+ @ Test def `type-params-in-enum2` =
1115+ check(
1116+ """ |enum MyOption[+<<AA>>]:
1117+ | case MySome(value: <<A@@A>>)
1118+ | case MyNone
1119+ |""" .stripMargin,
1120+ )
1121+
1122+ @ Test def `type-params-in-enum3` =
1123+ check(
1124+ """ |enum MyOption[<<AA>>](v: <<AA>>):
1125+ | def get: <<A@@A>> = ???
1126+ | case MySome[AA](value: AA) extends MyOption[Int](1)
1127+ |""" .stripMargin,
1128+ )
1129+
1130+ @ Test def `type-params-in-enum4` =
1131+ check(
1132+ """ |enum MyOption[+<<AA>>]:
1133+ | def get: <<A@@A>> = ???
1134+ | case MySome(value: <<AA>>)
1135+ | case MyNone
1136+ |""" .stripMargin,
1137+ )
1138+
1139+ @ Test def `type-params-in-enum5` =
1140+ check(
1141+ """ |enum MyOption[AA]:
1142+ | def get: AA = ???
1143+ | case MySome[<<AA>>](value: <<A@@A>>) extends MyOption[Int]
1144+ |""" .stripMargin,
1145+ )
0 commit comments