Kotlin: Add comment describing Kotlin array predicates

This commit is contained in:
Ian Lynagh
2023-05-11 18:01:07 +01:00
parent c1a52031cf
commit ad51767374

View File

@@ -551,6 +551,20 @@ open class KotlinUsesExtractor(
)
}
/*
Kotlin arrays can be broken down as:
isArray(t)
|- t.isBoxedArray
| |- t.isArray() e.g. Array<Boolean>, Array<Boolean?>
| |- t.isNullableArray() e.g. Array<Boolean>?, Array<Boolean?>?
|- t.isPrimitiveArray() e.g. BooleanArray
For the corresponding Java types:
Boxed arrays are represented as e.g. java.lang.Boolean[].
Primitive arrays are represented as e.g. boolean[].
*/
data class ArrayInfo(val elementTypeResults: TypeResults,
val componentTypeResults: TypeResults,
val dimensions: Int)