Extract TypeArgumentListMarker.all
This commit is contained in:
@@ -328,17 +328,6 @@ object AbstractTypeChecker {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private inline fun TypeArgumentListMarker.all(
|
|
||||||
context: AbstractTypeCheckerContext,
|
|
||||||
crossinline predicate: (TypeArgumentMarker) -> Boolean
|
|
||||||
): Boolean = with(context) {
|
|
||||||
repeat(size()) { index ->
|
|
||||||
if (!predicate(get(index))) return false
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private fun AbstractTypeCheckerContext.collectAllSupertypesWithGivenTypeConstructor(
|
private fun AbstractTypeCheckerContext.collectAllSupertypesWithGivenTypeConstructor(
|
||||||
baseType: SimpleTypeMarker,
|
baseType: SimpleTypeMarker,
|
||||||
constructor: TypeConstructorMarker
|
constructor: TypeConstructorMarker
|
||||||
|
|||||||
@@ -152,3 +152,13 @@ enum class CaptureStatus {
|
|||||||
FOR_INCORPORATION,
|
FOR_INCORPORATION,
|
||||||
FROM_EXPRESSION
|
FROM_EXPRESSION
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline fun TypeArgumentListMarker.all(
|
||||||
|
context: TypeSystemContext,
|
||||||
|
crossinline predicate: (TypeArgumentMarker) -> Boolean
|
||||||
|
): Boolean = with(context) {
|
||||||
|
repeat(size()) { index ->
|
||||||
|
if (!predicate(get(index))) return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user