mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-03 18:48:28 +07:00
#IDEA-265154 fixed Merge-request: IJ-MR-158642 Merged-by: Bartek Pacia <bartek.pacia@jetbrains.com> GitOrigin-RevId: 7a04d4830e1f76ee3ad965390f28168834dca9e9
25 lines
381 B
Java
25 lines
381 B
Java
// "Convert to record class" "true"
|
|
// no "true-preview" above because of IDEA-369873
|
|
interface IR1 {
|
|
int first();
|
|
}
|
|
|
|
interface IR2 {
|
|
int first();
|
|
}
|
|
|
|
record R(int first) implements IR1, IR2 {
|
|
|
|
@Override
|
|
public int first() {
|
|
return first > 0 ? first : -first;
|
|
}
|
|
}
|
|
|
|
class R2 implements IR1 {
|
|
@Override
|
|
public int first() {
|
|
return 0;
|
|
}
|
|
}
|