mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
final field initialization: class initializers (IDEA-130312)
This commit is contained in:
+17
@@ -259,4 +259,21 @@ class StaticInitializerUsedInAnotherStaticField {
|
||||
}
|
||||
|
||||
private static final int ourEnumerationCacheConstant = ENUMERATION_CACHE_SIZE;
|
||||
}
|
||||
|
||||
class InitializedInClassInitializerUsedInTheFollowingFieldInitializer {
|
||||
private final int i;
|
||||
{
|
||||
i = 0;
|
||||
}
|
||||
|
||||
private int j = i;
|
||||
|
||||
private final int k;
|
||||
|
||||
private int l = <error descr="Variable 'k' might not have been initialized">k</error>;
|
||||
|
||||
{
|
||||
k = 1;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user