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 78939ca commit 79bfff4Copy full SHA for 79bfff4
library/src-bootstrapped/scala/internal/TypeBox.scala
library/src/scala/internal/TypeBox.scala
@@ -0,0 +1,11 @@
1
+package scala.internal
2
+
3
+/** A type for skolems that are generated during capture conversion. Capture conversion
4
+ * narrows the type of a tree whose type has wildcard arguments. A typical situation
5
+ * is a tree `t` of type `C[_ >: L <: U]` and an expected type `C[X]` where `X` is an
6
+ * instantiatable type variable. To be able to instantiate `X`, we cast the tree to type
7
+ * `X[$n.CAP]` where `$n` is a fresh skolem type with underlying type `TypeBox[L, U]`.
8
+ */
9
+final abstract class TypeBox[-L <: U, +U] {
10
+ type CAP >: L <: U
11
+}
0 commit comments