mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-09 08:09:39 +07:00
NullableNotNullManager#findNullabilityDefault: avoid propagating default nullability to local variable type
GitOrigin-RevId: c89c89138ae819767dfecfa2b2e47fc126ecc9f1
This commit is contained in:
committed by
intellij-monorepo-bot
parent
197103f0fb
commit
659710fb77
@@ -381,6 +381,11 @@ public abstract class NullableNotNullManager {
|
||||
@NotNull PsiAnnotation.TargetType @NotNull ... placeTargetTypes) {
|
||||
PsiElement element = place.getParent();
|
||||
while (element != null) {
|
||||
if (element instanceof PsiTypeElement && element.getContext() instanceof PsiLocalVariable) {
|
||||
// Type of local variables is not influenced by container annotations
|
||||
return null;
|
||||
}
|
||||
|
||||
if (element instanceof PsiModifierListOwner) {
|
||||
NullabilityAnnotationInfo result = getNullityDefault((PsiModifierListOwner)element, placeTargetTypes, place, false);
|
||||
if (result != null) {
|
||||
|
||||
Reference in New Issue
Block a user