[codeInsight] IDEA-238740 Support the jdk.internal.PreviewFeature annotation

This patch adds check for of PreviewFeature for anonymous classes.

Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com>

GitOrigin-RevId: db5fe980e3f83e0df05bd21ab063d2a2c2862d6b
This commit is contained in:
Nikita Eshkeev
2020-06-22 22:00:03 +03:00
committed by intellij-monorepo-bot
parent cb4a818388
commit 85c3473223
2 changed files with 17 additions and 2 deletions
@@ -15,6 +15,9 @@ class Main {
<error descr="Records are not supported at language level '9'">new Main(42l)</error>;
<error descr="Text block literals are not supported at language level '9'">new Main("42")</error>;
new Main(42);
<error descr="Patterns in 'instanceof' are not supported at language level '9'">new org.myorg.preview.FromPreview() {
public void g(){}
}</error>;
}
}