mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user