mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-05 21:00:59 +07:00
ensure static fields/static initializers are evaluated before instance fields (IDEA-165084)
This commit is contained in:
@@ -299,3 +299,13 @@ class DefiniteAssignmentInFinally {
|
||||
}
|
||||
}
|
||||
}
|
||||
class StaticInitializerUsedInAnotherInstanceField {
|
||||
private final int myEnumerationCacheConstant = ENUMERATION_CACHE_SIZE;
|
||||
private static final int ourEnumerationCacheConstant = <error descr="Illegal forward reference">ENUMERATION_CACHE_SIZE</error>;
|
||||
|
||||
private static final int ENUMERATION_CACHE_SIZE;
|
||||
|
||||
static {
|
||||
ENUMERATION_CACHE_SIZE = 0;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user