IJ-CR-152155 [java-intentions] IDEA-365126 'BindFieldsFromParameters' shouldn't be offered when method has generic parameters

- more tests

GitOrigin-RevId: 8f580e7e8a32f51b1a8320fc82cdcec11dc4975f
This commit is contained in:
Mikhail Pyltsin
2024-12-25 20:26:01 +01:00
committed by intellij-monorepo-bot
parent 1c5efb8d49
commit 5c02553dad
4 changed files with 32 additions and 2 deletions

View File

@@ -0,0 +1,12 @@
// "Bind method parameters to fields" "true-preview"
class Bar<T extends Number> {
private Class<T> myA;
private int myB;
void get(Class<T> a, int b) {
myA = a;
myB = b;
}
}

View File

@@ -0,0 +1,10 @@
// "Bind method parameters to fields" "true-preview"
class Bar {
private int myB;
<T> void get(Class<T> a, int b) {
myB = b;
}
}

View File

@@ -0,0 +1,8 @@
// "Bind method parameters to fields" "true-preview"
class Bar<T extends Number> {
void <caret>get(Class<T> a, int b) {
}
}

View File

@@ -1,8 +1,8 @@
// "Bind constructor parameters to fields" "false"
// "Bind method parameters to fields" "true-preview"
class Bar {
<T> void get<caret>(Class<T> a) {
<T> void <caret>get(Class<T> a, int b) {
}
}