Constraint::Constraint(ConstraintKind kind, Fix fix, Type first, Type second, ConstraintLocator *locator, ArrayRef<TypeVariableType *> typeVars) : Kind(kind), TheFix(fix.getKind()), FixData(fix.getData()), HasRestriction(false), HasFix(true), IsActive(false), RememberChoice(false), IsFavored(false), NumTypeVariables(typeVars.size()), Types{ first, second, Identifier() }, Locator(locator) { assert(!first.isNull()); assert(!second.isNull()); std::copy(typeVars.begin(), typeVars.end(), getTypeVariablesBuffer().begin()); }