Split off a PolymorphicFunctionType from FunctionType. I am

*positive* that the behavior here is blatantly wrong in a lot
of places, but I'm going to leave it to Doug to clean up after me. :)

Swift SVN r2255
This commit is contained in:
John McCall
2012-06-27 00:22:15 +00:00
parent f44ed312ad
commit 668f674bfa
21 changed files with 314 additions and 115 deletions

View File

@@ -56,8 +56,9 @@ bool Parser::checkFullyTyped(Type type) {
case TypeKind::ArraySlice:
return checkFullyTyped(cast<ArraySliceType>(type)->getBaseType());
case TypeKind::Function: {
FunctionType *fn = cast<FunctionType>(type);
case TypeKind::Function:
case TypeKind::PolymorphicFunction: {
AnyFunctionType *fn = cast<AnyFunctionType>(type);
return checkFullyTyped(fn->getInput())
| checkFullyTyped(fn->getResult());
}