final field initialization: class initializers (IDEA-130312)

This commit is contained in:
Anna Kozlova
2014-10-30 18:41:03 +01:00
parent 113d5db581
commit 14f91eb65f
2 changed files with 21 additions and 3 deletions
@@ -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;
}
}