TypeConstraint.Constrained.getPsiType fixed for unresolved types

GitOrigin-RevId: 911d40176b49d20d3314225eb173166e2c266b00
This commit is contained in:
Tagir Valeev
2019-12-22 08:42:08 +00:00
committed by intellij-monorepo-bot
parent 8691569a6f
commit 6e2f8fab60
@@ -269,7 +269,7 @@ public interface TypeConstraint {
@Nullable
@Override
public PsiType getPsiType(Project project) {
PsiType[] conjuncts = StreamEx.of(myInstanceOf).map(exact -> exact.getPsiType(project)).toArray(PsiType.EMPTY_ARRAY);
PsiType[] conjuncts = StreamEx.of(myInstanceOf).map(exact -> exact.getPsiType(project)).nonNull().toArray(PsiType.EMPTY_ARRAY);
return conjuncts.length == 0 ? null : PsiIntersectionType.createIntersection(true, conjuncts);
}