allow compile-time constants to be used from static field initializers (IDEA-142243)

This commit is contained in:
Anna Kozlova
2015-10-06 17:36:57 +02:00
parent 2b1d69daf1
commit 5ae9332d1a
4 changed files with 15 additions and 2 deletions
@@ -0,0 +1,10 @@
class Test {
void m() {
final String s = "b";
final Object o = null;
class A {
static final String t = s;
<error descr="Inner classes cannot have static declarations">static</error> final Object j = <error descr="Non-static variable 'o' cannot be referenced from a static context">o</error>;
}
}
}