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(
|
||||
baseType: SimpleTypeMarker,
|
||||
constructor: TypeConstructorMarker
|
||||
|
||||
@@ -151,4 +151,14 @@ enum class CaptureStatus {
|
||||
FOR_SUBTYPING,
|
||||
FOR_INCORPORATION,
|
||||
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