Inherit type annotations for arrays

Fixes IDEA-240571 "implement method" action works bad with arrays notnulled twice

GitOrigin-RevId: 3014f528f6af966153ae4dc8c821240fca3d9d79
This commit is contained in:
Tagir Valeev
2020-05-20 08:50:34 +00:00
committed by intellij-monorepo-bot
parent d87f515faa
commit 983a6c1d3a
4 changed files with 43 additions and 2 deletions
@@ -0,0 +1,25 @@
// "Implement methods" "true"
package org.jetbrains.annotations;
import java.lang.annotation.*;
abstract class Test {
abstract void foo(@NotNull String @NotNull[] data);
abstract void foo2(@NotNull String @NotNull ... data);
}
class TImple extends Test {
@Override
void foo(@NotNull String @NotNull [] data) {
}
@Override
void foo2(@NotNull String @NotNull ... data) {
}
}
@Target({ElementType.PARAMETER, ElementType.TYPE_USE})
@interface NotNull {}
@@ -0,0 +1,15 @@
// "Implement methods" "true"
package org.jetbrains.annotations;
import java.lang.annotation.*;
abstract class Test {
abstract void foo(@NotNull String @NotNull[] data);
abstract void foo2(@NotNull String @NotNull ... data);
}
<caret>class TImple extends Test {}
@Target({ElementType.PARAMETER, ElementType.TYPE_USE})
@interface NotNull {}