[NI] Avoid computing few things for simple calls without type variables

This commit is contained in:
Mikhail Zarechenskiy
2019-09-17 18:47:39 +03:00
parent 7bd65c0bcd
commit 1a50a3cbb1
10 changed files with 38 additions and 10 deletions
@@ -456,6 +456,10 @@ interface ClassicTypeSystemContext : TypeSystemInferenceExtensionContext, TypeSy
errorSupportedOnlyInTypeInference()
}
override fun createEmptySubstitutor(): TypeSubstitutorMarker {
errorSupportedOnlyInTypeInference()
}
override fun TypeSubstitutorMarker.safeSubstitute(type: KotlinTypeMarker): KotlinTypeMarker {
require(type is UnwrappedType, type::errorMessage)
require(this is TypeSubstitutor, this::errorMessage)
@@ -146,6 +146,7 @@ interface TypeSystemInferenceExtensionContext : TypeSystemContext, TypeSystemBui
fun DefinitelyNotNullTypeMarker.original(): SimpleTypeMarker
fun typeSubstitutorByTypeConstructor(map: Map<TypeConstructorMarker, KotlinTypeMarker>): TypeSubstitutorMarker
fun createEmptySubstitutor(): TypeSubstitutorMarker
fun TypeSubstitutorMarker.safeSubstitute(type: KotlinTypeMarker): KotlinTypeMarker