Skip to content

Commit 05c4782

Browse files
committed
[AST] Fix getUncurriedFunction
1 parent 2a61f17 commit 05c4782

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/AST/ASTContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3137,7 +3137,7 @@ AnyFunctionType *AnyFunctionType::getUncurriedFunction() {
31373137
auto innerFunction = getResult()->castTo<AnyFunctionType>();
31383138
SmallVector<TupleTypeElt, 4> params{getInput()->getDesugaredType()};
31393139

3140-
if (auto tuple = innerFunction->getInput()->getAs<TupleType>())
3140+
if (auto tuple = dyn_cast<TupleType>(innerFunction->getInput().getPointer()))
31413141
params.append(tuple->getElements().begin(), tuple->getElements().end());
31423142
else
31433143
params.push_back(innerFunction->getInput()->getDesugaredType());

0 commit comments

Comments
 (0)