[NI] Improvements for "not enough information" diagnostic

#KT-30590 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2019-04-23 00:45:29 +03:00
parent 09cc2ae27f
commit ff0993153c
13 changed files with 142 additions and 29 deletions
@@ -49,6 +49,11 @@ interface ClassicTypeSystemContext : TypeSystemInferenceExtensionContext {
return this.isError
}
override fun KotlinTypeMarker.isUninferredParameter(): Boolean {
require(this is KotlinType, this::errorMessage)
return ErrorUtils.isUninferredParameter(this)
}
override fun SimpleTypeMarker.isStubType(): Boolean {
require(this is SimpleType, this::errorMessage)
return this is StubType
@@ -145,6 +145,7 @@ interface TypeSystemContext : TypeSystemOptimizationContext {
fun KotlinTypeMarker.asFlexibleType(): FlexibleTypeMarker?
fun KotlinTypeMarker.isError(): Boolean
fun KotlinTypeMarker.isUninferredParameter(): Boolean
fun FlexibleTypeMarker.asDynamicType(): DynamicTypeMarker?