Skip to content

Commit 891db3c

Browse files
committed
Restore original spec
1 parent 77bd0cc commit 891db3c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

compiler/src/dotty/tools/dotc/transform/TypeTestsCasts.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ object TypeTestsCasts {
4747
* 4. if `P = Array[T]`, checkable(E, T) where `E` is the element type of `X`, defaults to `Any`.
4848
* 5. if `P` is `pre.F[Ts]` and `pre.F` refers to a class which is not `Array`:
4949
* (a) replace `Ts` with fresh type variables `Xs`
50-
* (b) check that we can constrain `Xs` such that `pre.F[Xs] <:< X` and `pre.F[Xs] <:< P`
51-
* can both be true at the same time.
50+
* (b) constrain `Xs` with `pre.F[Xs] <:< X`
51+
* (c) instantiate Xs and check `pre.F[Xs] <:< P`
5252
* 6. if `P = T1 | T2` or `P = T1 & T2`, checkable(X, T1) && checkable(X, T2).
5353
* 7. if `P` is a refinement type, FALSE
5454
* 8. otherwise, TRUE

0 commit comments

Comments
 (0)