variable already assigned: ensure second assignment is raised, simplification (IDEA-202897)

This commit is contained in:
Anna.Kozlova
2018-11-27 16:23:53 +01:00
parent f87f1f3fca
commit ec5c0c4a60
4 changed files with 49 additions and 44 deletions
@@ -0,0 +1,26 @@
class A {
static {
c = "c";
}
static String b = a = "";
static String d = <error descr="Variable 'c' might already have been assigned to">c</error> = "";
static {
<error descr="Variable 'a' might already have been assigned to">a</error> = "";
}
static final String a;
static final String c;
}
class B {
{
c = "c";
}
String b = a = "";
String d = <error descr="Variable 'c' might already have been assigned to">c</error> = "";
{
<error descr="Variable 'a' might already have been assigned to">a</error> = "";
}
final String a;
final String c;
}