Skip to content

Commit 79bfff4

Browse files
committed
Document TypeBox and move to library/src
1 parent 78939ca commit 79bfff4

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

library/src-bootstrapped/scala/internal/TypeBox.scala

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)