mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Lift Requirement and Parameter Accessors up to GenericSignature
Start treating the null {Can}GenericSignature as a regular signature
with no requirements and no parameters. This not only makes for a much
safer abstraction, but allows us to simplify a lot of the clients of
GenericSignature that would previously have to check for null before
using the abstraction.
This commit is contained in:
@@ -1816,7 +1816,7 @@ giveUpFastPath:
|
||||
}
|
||||
|
||||
bool found = false;
|
||||
for (auto paramTy : currentSig->getGenericParams()) {
|
||||
for (auto paramTy : currentSig.getGenericParams()) {
|
||||
if (paramTy->getIndex() == paramIndex &&
|
||||
paramTy->getDepth() == depth) {
|
||||
values.clear();
|
||||
@@ -4110,7 +4110,7 @@ public:
|
||||
paramCount += paramList->size();
|
||||
}
|
||||
assert(paramCount ==
|
||||
extension->getGenericSignature()->getGenericParams().size());
|
||||
extension->getGenericSignature().getGenericParams().size());
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user