…lines 1–201 unchanged (201 lines)
202 FlowScope blindScope, boolean outcome) {
203 if (condition.getType() == CALL && condition.getChildCount() == 2) {
204 Node callee = condition.getFirstChild();
205 Node param = condition.getLastChild();
206 if (callee.getType() == GETPROP && param.isQualifiedName()) {
207 JSType paramType = getTypeIfRefinable(param, blindScope);
208 if (paramType != null) {
209 Node left = callee.getFirstChild();
210 Node right = callee.getLastChild();
211 if (left.getType() == NAME && "goog".equals(left.getString()) &&
212 right.getType() == STRING) {
213 Function<TypeRestriction, JSType> restricter =
214 restricters.get(right.getString());
215 if (restricter != null) {
216 return restrictParameter(param, paramType, blindScope, restricter,
217 outcome);
218 }
219 }
220 }
221 }
222 }
223 return nextPreciserScopeKnowingConditionOutcome(
224 condition, blindScope, outcome);
225 }
226
227 private FlowScope restrictParameter(Node parameter, JSType type,
228 FlowScope blindScope, Function<TypeRestriction, JSType> restriction,
…lines 229–253 unchanged (25 lines)