mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-17 16:19:58 +07:00
[codeInsight] IDEA-244252 IDEA shows no error for @PreviewFeature
This patch applies more robust approach to check if an enclosing class of a class member contains the PreviewFeature annotation by checking if the owner is instance of PsiMember or not. Such check is ignored for static members because they are ignored by javac too. Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com> GitOrigin-RevId: da2d4341fc734f97535c1baf575b6a95a1350d6c
This commit is contained in:
committed by
intellij-monorepo-bot
parent
0d5bdbaa0e
commit
1789438a05
+8
@@ -1,10 +1,18 @@
|
||||
import <error descr="Patterns in 'instanceof' are not supported at language level '9'">org.myorg.preview.FromPreview</error>;
|
||||
import static <error descr="Patterns in 'instanceof' are not supported at language level '9'">org.myorg.preview.FromPreview</error>.f;
|
||||
import static <error descr="Patterns in 'instanceof' are not supported at language level '9'">org.myorg.preview.FromPreview</error>.*;
|
||||
import static <error descr="Class 'B' is in the default package">B</error>.g;
|
||||
|
||||
class Main {
|
||||
static {
|
||||
<error descr="Patterns in 'instanceof' are not supported at language level '9'">org.myorg.preview.FromPreview</error>.f();
|
||||
<error descr="Patterns in 'instanceof' are not supported at language level '9'">f</error>();
|
||||
<error descr="Text block literals are not supported at language level '9'">B</error>.g();
|
||||
g();
|
||||
}
|
||||
}
|
||||
|
||||
@jdk.internal.PreviewFeature(feature = jdk.internal.PreviewFeature.Feature.TEXT_BLOCKS)
|
||||
class B {
|
||||
static void g() {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user