Report error if fun interface method has JVM name getFunctionDelegate

This is needed so that it wouldn't clash with the corresponding member
from the kotlin/jvm/internal/FunctionAdapter interface, which all fun
interface wrappers will implement to get proper equals/hashCode. The
workaround is to rename the fun interface method.

 #KT-33455
This commit is contained in:
Alexander Udalov
2020-04-22 18:21:49 +02:00
parent 55934ff63a
commit b77e5a21ec
10 changed files with 165 additions and 1 deletions
@@ -7944,6 +7944,11 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirOldFronte
runTest("compiler/testData/diagnostics/tests/funInterface/funIsNotInheritedFromBaseInterface.kt");
}
@TestMetadata("functionDelegateClashOnJvm.kt")
public void testFunctionDelegateClashOnJvm() throws Exception {
runTest("compiler/testData/diagnostics/tests/funInterface/functionDelegateClashOnJvm.kt");
}
@TestMetadata("genericSubstitutionForFunInterface.kt")
public void testGenericSubstitutionForFunInterface() throws Exception {
runTest("compiler/testData/diagnostics/tests/funInterface/genericSubstitutionForFunInterface.kt");