mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-04 12:17:12 +07:00
Java: fix error message when assignment before chained constructor call (IDEA-375281)
(cherry picked from commit 49c4a8ce04845726d1c35aa114612bf5410e1a37) (cherry picked from commit 65c5e6c26545cad86d03d71f9d1ab818b4f8e1af) IJ-MR-169535 GitOrigin-RevId: 099919c02438d74a307aa939f2128ad00aac15f9
This commit is contained in:
committed by
intellij-monorepo-bot
parent
0321ccb557
commit
7737d87729
@@ -211,4 +211,19 @@ class Person {
|
||||
}
|
||||
class Other {
|
||||
Other(int x) {}
|
||||
}
|
||||
class Machine {
|
||||
private final boolean big;
|
||||
Machine(boolean big) {
|
||||
this.big = big;
|
||||
}
|
||||
|
||||
Machine() {
|
||||
<error descr="Cannot assign final field 'big' before chained constructor call">big</error> = false;
|
||||
this(false);
|
||||
}
|
||||
|
||||
Machine(int size) {
|
||||
this(<error descr="Cannot assign final field 'big' before chained constructor call">big</error> = size > 10);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user