Do not generate non-standard compareTo as primitive comparison in all backends

Previous changes related to this in the old JVM backend were in
582b1c5e66 and
0482f7e9c5, but they did not affect the
`ProperIeee754Comparisons` mode which became the default in 1.4.0. As a
result, we had a regression here.

Since the `PRIMITIVE_NUMERIC_COMPARISON_INFO` slice is used in psi2ir to
determine how to generate the comparison, this fixes the regression both
in the old JVM backend, and in all IR backends.

 #KT-41426 Fixed
This commit is contained in:
Alexander Udalov
2020-08-27 17:30:32 +02:00
parent 9d81e50128
commit 74c6d2b951
10 changed files with 105 additions and 5 deletions
@@ -20516,6 +20516,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/operatorConventions/compareTo/comparable.kt");
}
@TestMetadata("customCompareTo.kt")
public void testCustomCompareTo() throws Exception {
runTest("compiler/testData/codegen/box/operatorConventions/compareTo/customCompareTo.kt");
}
@TestMetadata("doubleInt.kt")
public void testDoubleInt() throws Exception {
runTest("compiler/testData/codegen/box/operatorConventions/compareTo/doubleInt.kt");