mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
GenerateMembersUtil#copyAnnotations: exclude annotations already copied to type (IDEA-236474)
Also: check that annotations resolve to the same type in target place. GitOrigin-RevId: 0093c5966f37281b4f852e78a8cd5cd6667527f4
This commit is contained in:
committed by
intellij-monorepo-bot
parent
713cd98e68
commit
4db59b2205
+20
@@ -0,0 +1,20 @@
|
||||
|
||||
import java.lang.annotation.*;
|
||||
import java.util.Map;
|
||||
|
||||
@Target({ElementType.METHOD, ElementType.TYPE_USE})
|
||||
@interface Foo {}
|
||||
|
||||
interface X {
|
||||
@Foo Map.@Foo Entry getString();
|
||||
}
|
||||
|
||||
static class Y implements X {
|
||||
X x;
|
||||
|
||||
@Override
|
||||
@Foo
|
||||
public Map.@Foo Entry getString() {
|
||||
return x.getString();
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
import pkg.Foo;
|
||||
|
||||
import java.io.Writer;
|
||||
|
||||
class Impl extends Abstract {
|
||||
Abstract orig;
|
||||
|
||||
@Override
|
||||
public @Foo Writer getWriter() {
|
||||
return orig.getWriter();
|
||||
}
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
|
||||
import java.lang.annotation.*;
|
||||
import java.util.Map;
|
||||
|
||||
@Target({ElementType.METHOD, ElementType.TYPE_USE})
|
||||
@interface Foo {}
|
||||
|
||||
interface X {
|
||||
@Foo Map.@Foo Entry getString();
|
||||
}
|
||||
|
||||
static class Y implements X {
|
||||
X x;
|
||||
|
||||
<caret>
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
|
||||
class Impl extends Abstract {
|
||||
Abstract orig;
|
||||
|
||||
<caret>
|
||||
}
|
||||
Reference in New Issue
Block a user