Skip to content

Commit bd4047b

Browse files
authored
Add Tips for Using Kind Polymorphism in Documents
1 parent d14c89b commit bd4047b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

docs/docs/reference/kind-polymorphism.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,6 @@ Some technical details: `AnyKind` is a synthesized class just like `Any`, but wi
4141
It is declared `abstract` and `final`, so it can be neither instantiated nor extended.
4242

4343
`AnyKind` plays a special role in Scala's subtype system: It is a supertype of all other types no matter what their kind is. It is also assumed to be kind-compatible with all other types. Furthermore, `AnyKind` is treated as a higher-kinded type (so it cannot be used as a type of values), but at the same time it has no type parameters (so it cannot be instantiated).
44+
45+
**Note**: This feature is considered experimental and is only enabled under a compiler flag
46+
(i.e. `-Ykind-polymorphism`).

0 commit comments

Comments
 (0)