mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-10 18:09:38 +07:00
Java: don't generate uncompilable code in case of chained constructors (IDEA-342068)
in "Initialize in constructor" quick-fix GitOrigin-RevId: 626d5ce6dfa823c0b1bd37c37c59edc1b45e03d6
This commit is contained in:
committed by
intellij-monorepo-bot
parent
415d6a8b56
commit
85598d6315
@@ -0,0 +1,14 @@
|
||||
// "Initialize in constructor" "true-preview"
|
||||
|
||||
class C {
|
||||
private final int a;
|
||||
private final int b;
|
||||
|
||||
C() {
|
||||
this(1);
|
||||
}
|
||||
C(int a) {
|
||||
this.a = a;
|
||||
b = 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
// "Initialize in constructor" "true-preview"
|
||||
|
||||
class C {
|
||||
private final int a;
|
||||
private final int b<caret>;
|
||||
|
||||
C() {
|
||||
this(1);
|
||||
}
|
||||
C(int a) {
|
||||
this.a = a;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user