[NI] Run arguments checker before outer call checker

This is needed because arguments checker updates unsubstituted and
 non-denotable types (type variables, IntegerValueType...)

 #KT-28718 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2019-01-10 14:57:11 +03:00
parent 55498450d1
commit bcc720f1db
7 changed files with 35 additions and 1 deletions
@@ -94,10 +94,11 @@ class ResolvedAtomCompleter(
topLevelCallCheckerContext
kotlinToResolvedCallTransformer.bindAndReport(topLevelCallContext, topLevelTrace, resolvedCall, diagnostics)
kotlinToResolvedCallTransformer.runCallCheckers(resolvedCall, callCheckerContext)
val lastCall = if (resolvedCall is VariableAsFunctionResolvedCall) resolvedCall.functionCall else resolvedCall
kotlinToResolvedCallTransformer.runArgumentsChecks(topLevelCallContext, topLevelTrace, lastCall as NewResolvedCallImpl<*>)
kotlinToResolvedCallTransformer.runCallCheckers(resolvedCall, callCheckerContext)
return resolvedCall
}
@@ -0,0 +1,8 @@
// !LANGUAGE: +ProperIeee754Comparisons +NewInference
fun box(): String {
if (-0.0 < 0.0) return "Fail 1"
if (-0.0 < 0) return "Fail 2"
return "OK"
}
@@ -11469,6 +11469,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/ieee754/lessDouble.kt");
}
@TestMetadata("lessDouble_properIeeeAndNewInference.kt")
public void testLessDouble_properIeeeAndNewInference() throws Exception {
runTest("compiler/testData/codegen/box/ieee754/lessDouble_properIeeeAndNewInference.kt");
}
@TestMetadata("lessDouble_properIeeeComparisons.kt")
public void testLessDouble_properIeeeComparisons() throws Exception {
runTest("compiler/testData/codegen/box/ieee754/lessDouble_properIeeeComparisons.kt");
@@ -11469,6 +11469,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/ieee754/lessDouble.kt");
}
@TestMetadata("lessDouble_properIeeeAndNewInference.kt")
public void testLessDouble_properIeeeAndNewInference() throws Exception {
runTest("compiler/testData/codegen/box/ieee754/lessDouble_properIeeeAndNewInference.kt");
}
@TestMetadata("lessDouble_properIeeeComparisons.kt")
public void testLessDouble_properIeeeComparisons() throws Exception {
runTest("compiler/testData/codegen/box/ieee754/lessDouble_properIeeeComparisons.kt");
@@ -11474,6 +11474,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/ieee754/lessDouble.kt");
}
@TestMetadata("lessDouble_properIeeeAndNewInference.kt")
public void testLessDouble_properIeeeAndNewInference() throws Exception {
runTest("compiler/testData/codegen/box/ieee754/lessDouble_properIeeeAndNewInference.kt");
}
@TestMetadata("lessDouble_properIeeeComparisons.kt")
public void testLessDouble_properIeeeComparisons() throws Exception {
runTest("compiler/testData/codegen/box/ieee754/lessDouble_properIeeeComparisons.kt");
@@ -9119,6 +9119,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/ieee754/lessDouble.kt");
}
@TestMetadata("lessDouble_properIeeeAndNewInference.kt")
public void testLessDouble_properIeeeAndNewInference() throws Exception {
runTest("compiler/testData/codegen/box/ieee754/lessDouble_properIeeeAndNewInference.kt");
}
@TestMetadata("lessDouble_properIeeeComparisons.kt")
public void testLessDouble_properIeeeComparisons() throws Exception {
runTest("compiler/testData/codegen/box/ieee754/lessDouble_properIeeeComparisons.kt");
@@ -10169,6 +10169,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/ieee754/lessDouble.kt");
}
@TestMetadata("lessDouble_properIeeeAndNewInference.kt")
public void testLessDouble_properIeeeAndNewInference() throws Exception {
runTest("compiler/testData/codegen/box/ieee754/lessDouble_properIeeeAndNewInference.kt");
}
@TestMetadata("lessDouble_properIeeeComparisons.kt")
public void testLessDouble_properIeeeComparisons() throws Exception {
runTest("compiler/testData/codegen/box/ieee754/lessDouble_properIeeeComparisons.kt");