CustomMethodHandlers: expect unknown size

Fixes EA-216984 - IAE: SpecialFieldValue.<init>

GitOrigin-RevId: 383e58d6c517c116ab5657d624df31791eabe4ba
This commit is contained in:
Tagir Valeev
2019-11-08 10:34:40 +00:00
committed by intellij-monorepo-bot
parent 62bdf2012a
commit 881c8edf0d
@@ -233,7 +233,7 @@ class CustomMethodHandlers {
else {
size = factory.getInt(args.myArguments.length / factor);
}
SpecialFieldValue sizeConstraint = COLLECTION_SIZE.withValue(size);
SpecialFieldValue sizeConstraint = size == DfaUnknownValue.getInstance() ? null : COLLECTION_SIZE.withValue(size);
DfaFactMap facts = DfaFactMap.EMPTY
.with(DfaFactType.TYPE_CONSTRAINT, dfaType.asConstraint())
.with(DfaFactType.NULLABILITY, DfaNullability.NOT_NULL)