code: private static void inferPropertyTypesToMatchConstraint(
        JSType type, JSType constraint) {
      if (type == null || constraint == null) {
        return;
      }
  
      type.matchConstraint(constraint);
    }
docs: Suppose X is an object with inferred properties.
  Suppose also that X is used in a way where it would only type-check
  correctly if some of those properties are widened.
  Then we should be polite and automatically widen X's properties.
  
  For a concrete example, consider:
  param x {{prop: (number|undefined)}}
  function f(x) {}
  f({});
  
  If we give the anonymous object an inferred property of (number|undefined),
  then this code will type-check appropriately.