mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 13:39:36 +07:00
IDEA-96228 (restrict annotation owner at lower language levels)
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import java.util.Collection;
|
||||
|
||||
@interface Anno {
|
||||
Anno[] nested() default {};
|
||||
}
|
||||
@@ -13,4 +15,12 @@ abstract class C {
|
||||
void notWrong() { }
|
||||
}
|
||||
|
||||
class B extends <error descr="Annotations are not allowed here">@Deprecated</error> Object{}
|
||||
class B extends <error descr="Annotations are not allowed here">@Deprecated</error> Object { }
|
||||
|
||||
enum E {
|
||||
@Anno E1
|
||||
}
|
||||
|
||||
interface I {
|
||||
@<error descr="Duplicate annotation">Anno</error> public @<error descr="Duplicate annotation">Anno</error> Collection<<error descr="Annotations are not allowed here">@Anno</error> String> method(@<error descr="Duplicate annotation">Anno</error> @<error descr="Duplicate annotation">Anno</error> Object o);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user