introduce param object: pass substitution around which won't be available after method signature is changed (IDEA-154208)

This commit is contained in:
Anna.Kozlova
2016-04-25 10:57:40 +02:00
parent d9288e4b42
commit 1ce6f8d2fa
15 changed files with 107 additions and 50 deletions
@@ -0,0 +1,13 @@
import java.util.List;
public class Param<T> {
private final List<T> y;
public Param(List<T> y) {
this.y = y;
}
public List<T> getY() {
return y;
}
}
@@ -0,0 +1,11 @@
import java.util.List;
public class Test {
public static <T> String foo(Param<T> param) {
return null;
}
void bar(List<Integer> list) {
System.out.println(foo(new Param<>(list)));
}
}
@@ -0,0 +1,12 @@
import java.util.Collection;
import java.util.List;
public class Test {
public static <T> String foo(List<T> y) {
return null;
}
void bar(List<Integer> list) {
System.out.println(foo(list));
}
}