IJ-CR-135655 [java-highlighting] S IDEA-286130 annotations are not allowed in permitted list

- fix text
- fix test

GitOrigin-RevId: 87072c9561528bd04a27c03293f926a33a2519f9
This commit is contained in:
Mikhail Pyltsin
2024-06-13 10:54:53 +00:00
committed by intellij-monorepo-bot
parent 91b1e453f4
commit ce5a0d65c2
2 changed files with 4 additions and 2 deletions
@@ -30,7 +30,7 @@ annotation.duplicate.explained=Duplicate annotation. {0}
annotation.non.repeatable=The declaration of ''{0}'' does not have a valid java.lang.annotation.Repeatable annotation
annotation.container.wrong.place=Container annotation ''{0}'' must not be present at the same time as the element it contains
annotation.container.not.applicable=Container annotation ''@{0}'' is not applicable to {1}
annotation.not.allowed.in.permit.list = Annotation is not allowed in permit list
annotation.not.allowed.in.permit.list=Annotations not allowed in 'permits' list
receiver.wrong.context=Receivers are not allowed outside of method parameter list
receiver.static.context=The receiver cannot be used in a static context
@@ -30,6 +30,8 @@ sealed class Parent permits TypedChild<error descr="Generics are not allowed in
non-sealed class TypedChild<F> extends Parent {}
@interface AnnotationType <error descr="'permits' not allowed on @interface">permits</error> I {}
class TestWithAnnotations{
@Target(ElementType.TYPE_USE)
@interface Ann {
@@ -38,7 +40,7 @@ class TestWithAnnotations{
public static void main(String[] args) {
}
sealed class PermittedAnnotations permits <error descr="Annotation is not allowed in permit list">@Ann</error> SealedOne {
sealed class PermittedAnnotations permits <error descr="Annotations not allowed in 'permits' list">@Ann</error> SealedOne {
}
non-sealed class SealedOne extends PermittedAnnotations {