diamonds: constructor varargs (IDEA-131918)

This commit is contained in:
Anna Kozlova
2014-10-29 14:21:11 +01:00
parent 6a08e626c6
commit f0fc85674e
2 changed files with 14 additions and 0 deletions
@@ -206,6 +206,11 @@ public class PsiDiamondTypeImpl extends PsiDiamondType {
protected PsiClass getContainingClass(PsiMethod method) {
return containingClass;
}
@Override
protected boolean acceptVarargs() {
return true;
}
};
processor.setArgumentList(argumentList);
@@ -24,3 +24,12 @@ class A<T> {
bar(s(get(), ""));
}
}
class B<T> {
public B(T entity) {}
public B(T entity, Integer... error){}
void foo(final Integer generalError){
B value = new B<>("", generalError);
}
}