Pseudocode: Filter out nulls before combining type predicates

#KT-5732 Fixed
This commit is contained in:
Alexey Sedunov
2014-09-08 13:54:51 +04:00
parent 81c7a1b1da
commit e274af7be8
@@ -1189,7 +1189,7 @@ public class JetControlFlowProcessor {
);
Map<PseudoValue, TypePredicate> valuesToTypePredicates = SmartFMap
.<PseudoValue, TypePredicate>emptyMap()
.plus(delegateValue, PseudocodePackage.and(typePredicates));
.plus(delegateValue, PseudocodePackage.and(KotlinPackage.filterNotNull(typePredicates)));
builder.magic(property, null, Collections.singletonList(delegateValue), valuesToTypePredicates, MagicKind.VALUE_CONSUMER);
}