[NI] Fix error type approximation in ILTApproximatorConfiguration

#KT-31441 Fixed
This commit is contained in:
Dmitriy Novozhilov
2019-05-17 14:44:28 +03:00
parent 6f9ef0d4b6
commit f54653eb2b
3 changed files with 17 additions and 0 deletions
@@ -96,6 +96,8 @@ open class TypeApproximatorConfiguration {
override val allFlexible: Boolean get() = true
override val intersection get() = ALLOWED
override val typeVariable: (TypeVariableTypeConstructorMarker) -> Boolean get() = { true }
override val errorType: Boolean get() = true
override fun capturedType(ctx: TypeSystemInferenceExtensionContext, type: CapturedTypeMarker): Boolean = true
}
}
@@ -0,0 +1,10 @@
// COMPILER_ARGUMENTS: -XXLanguage:+NewInference
// IS_APPLICABLE: false
interface List<T>
class ArrayList<T> : List<T>
fun test() {
val list: List<*> = ArrayList<caret><Any?>()
}
@@ -14624,6 +14624,11 @@ public class IntentionTestGenerated extends AbstractIntentionTest {
runTest("idea/testData/intentions/removeExplicitTypeArguments/insideOtherCall.kt");
}
@TestMetadata("kt31441.kt")
public void testKt31441() throws Exception {
runTest("idea/testData/intentions/removeExplicitTypeArguments/kt31441.kt");
}
@TestMetadata("lambdaType.kt")
public void testLambdaType() throws Exception {
runTest("idea/testData/intentions/removeExplicitTypeArguments/lambdaType.kt");