More friendly messages for change signature from usage; tests for records (IDEA-244030)

GitOrigin-RevId: 47ea76c9514b26c3e91a1b0e8450169a75b89576
This commit is contained in:
Tagir Valeev
2020-06-23 18:48:59 +03:00
committed by intellij-monorepo-bot
parent bbedc3df3b
commit 54dc3625c7
21 changed files with 67 additions and 19 deletions
@@ -1,4 +1,4 @@
// "Add 'int' as 3rd parameter to method 'E'" "true"
// "Add 'int' as 3rd parameter to constructor 'E'" "true"
enum E {
FIRST("a", "b", 1);
@@ -1,4 +1,4 @@
// "Add 'Foo' as 1st parameter to method 'Bar'" "true"
// "Add 'Foo' as 1st parameter to constructor 'Bar'" "true"
public class Bar {
Bar(Foo foo, String args) {
@@ -1,4 +1,4 @@
// "Add 'Inner1' as 1st parameter to method 'Inner2'" "true"
// "Add 'Inner1' as 1st parameter to constructor 'Inner2'" "true"
class CoolTest {
class Inner1 {}
@@ -1,4 +1,4 @@
// "Add 'int' as 3rd parameter to method 'E'" "true"
// "Add 'int' as 3rd parameter to constructor 'E'" "true"
enum E {
FIRST("a", "b", <caret>1);
@@ -1,4 +1,4 @@
// "Add 'Foo' as 1st parameter to method 'Bar'" "true"
// "Add 'Foo' as 1st parameter to constructor 'Bar'" "true"
public class Bar {
Bar(String args) {
@@ -1,4 +1,4 @@
// "Add 'Inner1' as 1st parameter to method 'Inner2'" "true"
// "Add 'Inner1' as 1st parameter to constructor 'Inner2'" "true"
class CoolTest {
class Inner1 {}
@@ -0,0 +1,8 @@
// "Add 'int' as 1st record component to record 'R'" "true"
record R(int i, int x) {}
class X {
void test() {
new R(1, 2);
}
}
@@ -0,0 +1,12 @@
// "Add 'int' as 1st record component to record 'R'" "true"
record R(int i, int x) {
R(int i, int x) {
this.x = x;
}
}
class X {
void test() {
new R(1, 2);
}
}
@@ -0,0 +1,8 @@
// "Add 'int' as 1st record component to record 'R'" "true"
record R(int x) {}
class X {
void test() {
new R(1, <caret>2);
}
}
@@ -0,0 +1,12 @@
// "Add 'int' as 1st record component to record 'R'" "true"
record R(int x) {
R(int x) {
this.x = x;
}
}
class X {
void test() {
new R(1, <caret>2);
}
}