When type-checking a slice type, "desugar" it to a type that is

generic over the type of the base.  By "generic" I mean that it's
looked up by prepending the word "Slice" to the name of the base
type.

Swift SVN r1464
This commit is contained in:
John McCall
2012-04-18 08:09:10 +00:00
parent e487813986
commit 6133630544
8 changed files with 138 additions and 8 deletions

View File

@@ -47,6 +47,9 @@ static bool checkFullyTyped(Parser &P, Type type) {
case TypeKind::Array:
return checkFullyTyped(P, cast<ArrayType>(type)->getBaseType());
case TypeKind::ArraySlice:
return checkFullyTyped(P, cast<ArraySliceType>(type)->getBaseType());
case TypeKind::Function: {
FunctionType *fn = cast<FunctionType>(type);
return checkFullyTyped(P, fn->getInput())