[FIR] Replace kotlin/Throwable with java/lang/Throwable in JvmMappedScope
#KT-39044 Fixed
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
// FULL_JDK
|
||||||
|
// ISSUE: KT-39044
|
||||||
|
|
||||||
|
fun test(t: Throwable) {
|
||||||
|
t.fillInStackTrace()
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
FILE: fillInStackTrace.kt
|
||||||
|
public final fun test(t: R|kotlin/Throwable|): R|kotlin/Unit| {
|
||||||
|
R|<local>/t|.R|java/lang/Throwable.fillInStackTrace|()
|
||||||
|
}
|
||||||
+5
@@ -108,6 +108,11 @@ public class FirDiagnosticsWithStdlibTestGenerated extends AbstractFirDiagnostic
|
|||||||
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/factoryFunctionOverloads.kt");
|
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/factoryFunctionOverloads.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("fillInStackTrace.kt")
|
||||||
|
public void testFillInStackTrace() throws Exception {
|
||||||
|
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/fillInStackTrace.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("functionAndFunctionN.kt")
|
@TestMetadata("functionAndFunctionN.kt")
|
||||||
public void testFunctionAndFunctionN() throws Exception {
|
public void testFunctionAndFunctionN() throws Exception {
|
||||||
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/functionAndFunctionN.kt");
|
runTest("compiler/fir/analysis-tests/testData/resolveWithStdlib/functionAndFunctionN.kt");
|
||||||
|
|||||||
@@ -30,12 +30,12 @@ class JvmMappedScope(
|
|||||||
val jvmSignature = symbol.fir.computeJvmDescriptor()
|
val jvmSignature = symbol.fir.computeJvmDescriptor()
|
||||||
.replace("kotlin/Any", "java/lang/Object")
|
.replace("kotlin/Any", "java/lang/Object")
|
||||||
.replace("kotlin/String", "java/lang/String")
|
.replace("kotlin/String", "java/lang/String")
|
||||||
|
.replace("kotlin/Throwable", "java/lang/Throwable")
|
||||||
if (jvmSignature in whiteListSignatures) {
|
if (jvmSignature in whiteListSignatures) {
|
||||||
processor(symbol)
|
processor(symbol)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
declaredMemberScope.processFunctionsByName(name, processor)
|
declaredMemberScope.processFunctionsByName(name, processor)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -44,7 +44,7 @@ fun foo(x: List<String>, y: Throwable, z: A3) {
|
|||||||
x.stream()
|
x.stream()
|
||||||
java.util.ArrayList<String>().stream()
|
java.util.ArrayList<String>().stream()
|
||||||
|
|
||||||
y.fillInStackTrace() checkType { _<Int>() }
|
y.fillInStackTrace() checkType { <!INAPPLICABLE_CANDIDATE!>_<!><Int>() }
|
||||||
|
|
||||||
HashMap<String, Int>().getOrDefault(Any(), null)
|
HashMap<String, Int>().getOrDefault(Any(), null)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user