Fix passing of structurable tuple to single Any param.

This commit is contained in:
Chris Willmore
2016-04-01 17:41:08 -07:00
parent 700bb5eb0f
commit 40e084ef72
2 changed files with 4 additions and 1 deletions

View File

@@ -516,7 +516,7 @@ matchCallArguments(ConstraintSystem &cs, TypeMatchKind kind,
// If the param type is an empty existential composition, the function can
// only have one argument. Check if exactly one argument was passed to this
// function, otherwise we obviously have a mismatch
if (auto tupleArgType = argType->getAs<TupleType>()) {
if (auto tupleArgType = dyn_cast<TupleType>(argType.getPointer())) {
if (tupleArgType->getNumElements() != 1) {
return ConstraintSystem::SolutionKind::Error;
}