Added missing specificity comparator to FIR
This is required to correctly resolve overloading in cases when we need to find most specific alternative in Java between int and Integer.
This commit is contained in:
+6
@@ -0,0 +1,6 @@
|
||||
// FULL_JDK
|
||||
import java.lang.Integer.getInteger
|
||||
|
||||
fun foo() {
|
||||
getInteger("text", 239)
|
||||
}
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
FILE: FlexiblePrimitiveOverloading.kt
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
R|java/lang/Integer.getInteger|(String(text), Int(239))
|
||||
}
|
||||
+5
@@ -725,6 +725,11 @@ public class FirDiagnosticsWithStdlibTestGenerated extends AbstractFirDiagnostic
|
||||
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/FieldSubstitution.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("FlexiblePrimitiveOverloading.kt")
|
||||
public void testFlexiblePrimitiveOverloading() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/FlexiblePrimitiveOverloading.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("flexibleTypeAliases.kt")
|
||||
public void testFlexibleTypeAliases() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/j+k/flexibleTypeAliases.kt");
|
||||
|
||||
Reference in New Issue
Block a user