Weaken assertion to work around the UIKit variadic method

import hack.

Swift SVN r27948
This commit is contained in:
John McCall
2015-04-29 23:45:35 +00:00
parent ec31f6dbc9
commit 018ce2edfc

View File

@@ -235,7 +235,10 @@ AbstractionPattern::getTupleElementType(unsigned index) const {
// If we imported as a tuple type, construct the special
// method-formal-parameters abstraction pattern.
if (isa<TupleType>(swiftEltType)) {
assert(method->parameters().size() ==
// This assertion gets messed up by variadic methods that we've
// imported as non-variadic.
assert(method->isVariadic() ||
method->parameters().size() ==
cast<TupleType>(swiftEltType)->getNumElements() +
unsigned(errorInfo.hasErrorParameter()));
return getObjCMethodFormalParamTuple(swiftEltType, method, errorInfo);