private static void inferPropertyTypesToMatchConstraint ( JSType type , JSType constraint ) { if ( type == null || constraint == null ) { return ; } type . matchConstraint ( constraint ) ; }
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 .