Split TypeBase::isDependentType() into isTypeParameter() and hasTypeParameter().

The isDependentType() query is woefully misunderstood. Some places
seem to want it to mean "a generic type parameter of dependent member
type", which corresponds to what is effectively a type parameter in
the language, while others want it to mean "contains a type parameter
anywhere in the type". Tease out these two meanings in
isTypeParameter() and hasTypeParameter(), respectively, and sort out
the callers.

Swift SVN r29945
This commit is contained in:
Doug Gregor
2015-07-07 21:20:54 +00:00
parent c3a6bca7b2
commit 3023a710fc
28 changed files with 82 additions and 83 deletions

View File

@@ -294,7 +294,7 @@ static bool verifySILSelfParameterType(SILDeclRef DeclRef,
// *NOTE* We do not run this check when we have a generic type since
// *generic types do not have type lowering and are always treated as
// *non-trivial since we do not know the type.
if (CTy->hasArchetype() || CTy->isDependentType() ||
if (CTy->hasArchetype() || CTy->hasTypeParameter() ||
M.getTypeLowering(Ty).isTrivial())
return true;