We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14e1079 commit 93ee5afCopy full SHA for 93ee5af
docs/src/md/kotlin.core/type-system.md
@@ -715,6 +715,28 @@ TODO(Need to think more about this part)
715
> // False
716
>
717
> }
718
+>
719
+> interface Recursive<T : Recursive<T>>
720
721
+> fun <T : Recursive<T>> probe(e: Recursive<T>): T = mk()
722
723
+> fun test04() {
724
+> val rec: Recursive<*> = mk()
725
726
+> probe(rec)
727
728
+> // ?- Recursive<*> <: Recursive<T>
729
+> //
730
+> // Recursive<KS> <: Recursive<KT>
731
+> // where Nothing <: KS <: Recursive<KS>
732
+> // Nothing <: KT <: Recursive<KT>
733
+> // (from type capturing)
734
+> // KS ⪯ KT
735
+> // (from subtyping for parameterized types)
736
+> // KS =:= KT
737
+> // (from type containment rules)
738
+> // True
739
+> }
740
> ```
741
742
#### Type containment
0 commit comments