Inline TypeCheckerContext::anySupertype

This method is a hot spot, since it's may be called
several times during one isSubtypeOf call and it contains
two lambdas, so it's worth inlining it
This commit is contained in:
Denis Zharkov
2017-10-02 10:44:29 +03:00
parent 2fa82edd85
commit 457b57ace2
@@ -65,7 +65,7 @@ open class TypeCheckerContext(val errorTypeEqualsToAnything: Boolean, val allowe
supertypesLocked = false
}
internal fun anySupertype(
internal inline fun anySupertype(
start: SimpleType,
predicate: (SimpleType) -> Boolean,
supertypesPolicy: (SimpleType) -> SupertypesPolicy