mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-30 18:28:55 +07:00
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
19 lines
954 B
Java
19 lines
954 B
Java
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() {}
|
|
}
|