CreateTypeParameter: don't suggest fix inside type parameter IDEA-195832

This commit is contained in:
Roman.Ivanov
2018-07-23 10:58:21 +07:00
parent 1694e1f7fb
commit 8f1873cbcf
3 changed files with 81 additions and 1 deletions
@@ -0,0 +1,40 @@
// "Create type parameter 'U'" "true"
public class Helpers {
interface RunAlgebra<A, R> {
}
interface ReturnAlgebra<R, O> {
}
interface SomeAlgebra<R> {
}
interface AlgebraImplementation extends ReturnAlgebra<String, Integer>, SomeAlgebra<String> {
}
public static <R> void giveMeAlgebraImplementation(RunAlgebra<AlgebraImplementation, R> algebra) {
}
public static <R, U, A extends ReturnAlgebra<R, U>> RunAlgebra<A, U> aReturn() {
return null;
}
public static <R, U, A extends ReturnAlgebra<R, U>> RunAlgebra<A, R> aReturn(String overload) {
return null;
}
public static <R,
A extends ReturnAlgebra<R, U>,
AI extends SomeAlgebra<R>, U> RunAlgebra<A, R> consumeReturn(A returnAlgebra) {
return null;
}
}
@@ -0,0 +1,40 @@
// "Create type parameter 'U'" "true"
public class Helpers {
interface RunAlgebra<A, R> {
}
interface ReturnAlgebra<R, O> {
}
interface SomeAlgebra<R> {
}
interface AlgebraImplementation extends ReturnAlgebra<String, Integer>, SomeAlgebra<String> {
}
public static <R> void giveMeAlgebraImplementation(RunAlgebra<AlgebraImplementation, R> algebra) {
}
public static <R, U, A extends ReturnAlgebra<R, U>> RunAlgebra<A, U> aReturn() {
return null;
}
public static <R, U, A extends ReturnAlgebra<R, U>> RunAlgebra<A, R> aReturn(String overload) {
return null;
}
public static <R,
A extends ReturnAlgebra<R, U<caret>>,
AI extends SomeAlgebra<R>> RunAlgebra<A, R> consumeReturn(A returnAlgebra) {
return null;
}
}