K2: don't throw an exception for type parameter case in isJavaTypeOnThePath
#KT-63569 Fixed
This commit is contained in:
committed by
Space Team
parent
8924e46458
commit
3b7f43a9c2
+6
@@ -21058,6 +21058,12 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/javaLangStringCtr.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaLikeCallOnTypeParameter.kt")
|
||||
public void testJavaLikeCallOnTypeParameter() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/javaLikeCallOnTypeParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaStaticImport.kt")
|
||||
public void testJavaStaticImport() throws Exception {
|
||||
|
||||
+6
@@ -21058,6 +21058,12 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/javaLangStringCtr.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaLikeCallOnTypeParameter.kt")
|
||||
public void testJavaLikeCallOnTypeParameter() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/javaLikeCallOnTypeParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaStaticImport.kt")
|
||||
public void testJavaStaticImport() throws Exception {
|
||||
|
||||
+6
@@ -21052,6 +21052,12 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/javaLangStringCtr.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaLikeCallOnTypeParameter.kt")
|
||||
public void testJavaLikeCallOnTypeParameter() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/javaLikeCallOnTypeParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaStaticImport.kt")
|
||||
public void testJavaStaticImport() throws Exception {
|
||||
|
||||
+6
@@ -21058,6 +21058,12 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/javaLangStringCtr.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaLikeCallOnTypeParameter.kt")
|
||||
public void testJavaLikeCallOnTypeParameter() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/javaLikeCallOnTypeParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaStaticImport.kt")
|
||||
public void testJavaStaticImport() throws Exception {
|
||||
|
||||
@@ -305,7 +305,7 @@ class FirSyntheticPropertiesScope private constructor(
|
||||
return false
|
||||
}
|
||||
is FirTypeParameterSymbol -> {
|
||||
error("Type parameter symbol ${dispatchReceiverClassSymbol.name} is not expected here")
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
// FIR_IDENTICAL
|
||||
// ISSUE: KT-63569
|
||||
|
||||
// FILE: Baz.java
|
||||
|
||||
public class Baz extends Base {
|
||||
public boolean isSomething() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: Foo.kt
|
||||
|
||||
abstract class Base {
|
||||
open fun isSomethingElse() = false
|
||||
}
|
||||
|
||||
abstract class Bar {
|
||||
open fun isSomething() = false
|
||||
}
|
||||
|
||||
abstract class BazBaz : Baz()
|
||||
|
||||
abstract class Foo<C : Bar, D : Baz, E : D, F : BazBaz> {
|
||||
abstract val c: C
|
||||
abstract val d: D
|
||||
abstract val e: E
|
||||
abstract val f: F
|
||||
|
||||
fun callMe() {
|
||||
c.<!FUNCTION_CALL_EXPECTED!>isSomething<!>
|
||||
d.isSomething
|
||||
d.<!FUNCTION_CALL_EXPECTED!>isSomethingElse<!>
|
||||
e.isSomething
|
||||
f.<!FUNCTION_CALL_EXPECTED!>isSomethingElse<!>
|
||||
}
|
||||
}
|
||||
Generated
+6
@@ -21058,6 +21058,12 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/javaLangStringCtr.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaLikeCallOnTypeParameter.kt")
|
||||
public void testJavaLikeCallOnTypeParameter() throws Exception {
|
||||
runTest("compiler/testData/diagnostics/tests/j+k/javaLikeCallOnTypeParameter.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("javaStaticImport.kt")
|
||||
public void testJavaStaticImport() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user