Treat deducible generic parameter types as unresolved types, because

they need to be substituted away for any type containing them to be
useful. A nice side-effect of this is that we'll actually properly
walk into the source type when a generic function returns, e.g., a
tuple type that involves type parameters not resolved by the input
arguments.


Swift SVN r2302
This commit is contained in:
Doug Gregor
2012-07-03 23:23:25 +00:00
parent 99fac3aaa8
commit ad2fa39eaa
2 changed files with 14 additions and 3 deletions

View File

@@ -1235,7 +1235,7 @@ class DeducibleGenericParamType : public SubstitutableType {
DeducibleGenericParamType(ASTContext &Ctx, Identifier Name, unsigned Index,
ArrayRef<ProtocolDecl *> ConformsTo)
: SubstitutableType(TypeKind::DeducibleGenericParam, &Ctx,
/*Unresolved=*/false, ConformsTo),
/*Unresolved=*/true, ConformsTo),
Name(Name), Index(Index) { }
public: