Files
Alexandr Suhininandintellij-monorepo-bot d75d619ab9 [extract method] IDEA-251837 use type element to annotate method nullability
[extract method] IDEA-251837 fix texts

GitOrigin-RevId: 37da2e7e8f83a4d85a87c644788a66ce6ea1e05f
2024-01-12 16:42:18 +00:00

25 lines
651 B
Java

import org.jetbrains.annotations.NotNull;
public class Test<R> {
private R getR() {
return null;
}
public <T extends CharSequence> void main(String[] args, T param) {
MyResult<T, R> myVariable = getTrMyResult(param);
System.out.println("Custom(" + myVariable.t() + ", " + myVariable.r() + ")");
}
private <T extends CharSequence> @NotNull MyResult<T, R> getTrMyResult(T param) {
T t = param;
R r = getR();
System.out.println();
MyResult<T, R> myVariable = new MyResult<>(t, r);
return myVariable;
}
private record MyResult<T extends CharSequence, R>(T t, R r) {
}
}