Skip to content

Commit 825dbdf

Browse files
committed
fix typo in numbering of rules
1 parent ce22485 commit 825dbdf

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,16 @@ object Checkable {
4646
* 1. if `P` is a singleton type, TRUE
4747
* 2. if `P` is WildcardType, TRUE
4848
* 3. if `P = T @unchecked`, TRUE
49-
* 3. if `P` refers to an abstract type member, FALSE
50-
* 4. if `P = Array[T]`, checkable(E, T) where `E` is the element type of `X`, defaults to `Any`.
51-
* 5. if `P` is `pre.F[Ts]` and `pre.F` refers to a class which is not `Array`:
49+
* 4. if `P` refers to an abstract type member, FALSE
50+
* 5. if `P = Array[T]`, checkable(E, T) where `E` is the element type of `X`, defaults to `Any`.
51+
* 6. if `P` is `pre.F[Ts]` and `pre.F` refers to a class which is not `Array`:
5252
* (a) replace `Ts` with fresh type variables `Xs`
5353
* (b) instantiate `Xs` with the constraint `pre.F[Xs] <:< X`
5454
* (c) `pre.F[Xs] <:< P2`, where `P2` is `P` with pattern binder types (e.g., `_$1`)
5555
* replaced with `WildcardType`.
56-
* 6. if `P = T1 | T2` or `P = T1 & T2`, checkable(X, T1) && checkable(X, T2).
57-
* 7. if `P` is a refinement type, FALSE
58-
* 8. otherwise, TRUE
56+
* 7. if `P = T1 | T2` or `P = T1 & T2`, checkable(X, T1) && checkable(X, T2).
57+
* 8. if `P` is a refinement type, FALSE
58+
* 9. otherwise, TRUE
5959
*/
6060
def checkable(X: Type, P: Type)(implicit ctx: Context): Boolean = {
6161
def Psym = P.dealias.typeSymbol

0 commit comments

Comments
 (0)