@Override
public FlowScope getPreciserScopeKnowingConditionOutcome(Node condition,
FlowScope blindScope, boolean outcome) {
if (condition.isCall() && condition.getChildCount() == 2) {
Node callee = condition.getFirstChild();
Node param = condition.getLastChild();
if (callee.isGetProp() && param.isQualifiedName()) {
JSType paramType = getTypeIfRefinable(param, blindScope);
Node left = callee.getFirstChild();
Node right = callee.getLastChild();
if (left.isName() && "goog".equals(left.getString()) &&
right.isString()) {
Function<TypeRestriction, JSType> restricter =
restricters.get(right.getString());
if (restricter != null) {
return restrictParameter(param, paramType, blindScope, restricter,
outcome);
}
}
}
}
return nextPreciserScopeKnowingConditionOutcome(
condition, blindScope, outcome);
}