type migration: fix AIOOBE for method with generic varargs migration (EA-87127) update (IDEA-CR-19211)

This commit is contained in:
Dmitry Batkovich
2017-03-22 11:32:21 +03:00
parent 0a43c1fc30
commit 5f5c24064b
6 changed files with 78 additions and 6 deletions
@@ -0,0 +1,12 @@
Types:
PsiField:migrationField : Test<java.lang.Short>
PsiMethodCallExpression:migrationField.method(x1, x2) : void
PsiReferenceExpression:migrationField : Test<java.lang.Short>
Conversions:
migrationField.method(x1, x2) -> $
x1 -> $
x2 -> $
New expression type changes:
Fails:
@@ -0,0 +1,11 @@
class Test<X> {
private static Test<Short> migrationField;
private static void m(Short x1, Short x2) {
migrationField.method(x1, x2);
}
void method(X... xes) {
}
}
@@ -0,0 +1,11 @@
class Test<X> {
private static Test<Number> migrationField;
private static void m(Short x1, Short x2) {
migrationField.method(x1, x2);
}
void method(X... xes) {
}
}