mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 11:50:54 +07:00
[kotlin] JavaCollectionWithNullableTypeArgumentInspection: skip super type qualifier
Thus avoiding the exception from Analysis API, which will only be fixed after the next kt-master merge in the best case. Since the check is safe and not very complicated, it can be left in the code even after the AA bug is fixed. KT-77333 GitOrigin-RevId: 0a6312f12a97d87a783193384541451994b0926f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
74e1bb2cbd
commit
d666b6a123
@@ -105,6 +105,7 @@ internal class JavaCollectionWithNullableTypeArgumentInspection :
|
||||
|
||||
override fun KaSession.prepareContext(element: KtElement): Context? {
|
||||
if (PsiTreeUtil.hasErrorElements(element)) return null // Temporary check until KT-77222 is fixed
|
||||
if (element is KtTypeReference && element.parent is KtSuperExpression) return null // super type qualifier `super<Foo>`
|
||||
val typeArguments = element.getTypeArguments() ?: return null
|
||||
|
||||
val canMakeNonNullable: Boolean
|
||||
|
||||
@@ -15730,6 +15730,11 @@ public abstract class K2LocalInspectionTestGenerated extends AbstractK2LocalInsp
|
||||
runTest("../../../idea/tests/testData/inspectionsLocal/javaCollectionsWithNullableTypes/nullableTypealias.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("superTypeQualifier.kt")
|
||||
public void testSuperTypeQualifier() throws Exception {
|
||||
runTest("../../../idea/tests/testData/inspectionsLocal/javaCollectionsWithNullableTypes/superTypeQualifier.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("typeReference.kt")
|
||||
public void testTypeReference() throws Exception {
|
||||
runTest("../../../idea/tests/testData/inspectionsLocal/javaCollectionsWithNullableTypes/typeReference.kt");
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
// PROBLEM: none
|
||||
interface I {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
class C : I {
|
||||
override fun foo() {
|
||||
super<<caret>I>.foo()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user