PsiType (@Nullable PsiType type, @NotNull PsiSubstitutor substitutor, @Nullable SpreadState state, @NotNull GrExpression expression) { if (type == null) return null; type = substitutor.substitute(type); if (type == null) return null; type = PsiImplUtil.normalizeWildcardTypeByPosition(type, expression); type = SpreadState.apply(type, state, expression.getProject()); return type; }