IR: check absence of extension receiver in isMethodOfAny
Otherwise extension methods named toString/equals/hashCode were generated incorrectly on JVM IR, which could result in AbstractMethodError at runtime. #KT-45963 Fixed
This commit is contained in:
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
Generated
+5
@@ -10764,6 +10764,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
|
||||
runTest("compiler/testData/codegen/box/extensionFunctions/kt865.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("memberExtensionEqualsHashCodeToStringInInterface.kt")
|
||||
public void testMemberExtensionEqualsHashCodeToStringInInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/extensionFunctions/memberExtensionEqualsHashCodeToStringInInterface.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nested2.kt")
|
||||
public void testNested2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/extensionFunctions/nested2.kt");
|
||||
|
||||
Generated
+5
@@ -10185,6 +10185,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/extensionFunctions/kt865.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("memberExtensionEqualsHashCodeToStringInInterface.kt")
|
||||
public void testMemberExtensionEqualsHashCodeToStringInInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/extensionFunctions/memberExtensionEqualsHashCodeToStringInInterface.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nested2.kt")
|
||||
public void testNested2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/extensionFunctions/nested2.kt");
|
||||
|
||||
Generated
+5
@@ -10185,6 +10185,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
|
||||
runTest("compiler/testData/codegen/box/extensionFunctions/kt865.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("memberExtensionEqualsHashCodeToStringInInterface.kt")
|
||||
public void testMemberExtensionEqualsHashCodeToStringInInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/extensionFunctions/memberExtensionEqualsHashCodeToStringInInterface.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nested2.kt")
|
||||
public void testNested2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/extensionFunctions/nested2.kt");
|
||||
|
||||
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java
Generated
+5
@@ -5089,6 +5089,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
|
||||
runTest("compiler/testData/codegen/box/extensionFunctions/kt5467.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("memberExtensionEqualsHashCodeToStringInInterface.kt")
|
||||
public void testMemberExtensionEqualsHashCodeToStringInInterface() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/extensionFunctions/memberExtensionEqualsHashCodeToStringInInterface.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nested2.kt")
|
||||
public void testNested2() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/extensionFunctions/nested2.kt");
|
||||
|
||||
Reference in New Issue
Block a user