mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Start naming functions more uniformly.
For any function that has a name, ensure that the name is a compound name with argument names for each of the parameters. Swift SVN r16398
This commit is contained in:
@@ -2205,6 +2205,15 @@ void FuncDecl::setDeserializedSignature(ArrayRef<Pattern *> ArgParams,
|
||||
assert(ArgParams.size() == BodyParams.size());
|
||||
assert(NumParamPatterns == ArgParams.size());
|
||||
|
||||
#ifndef NDEBUG
|
||||
unsigned NumParams = getDeclContext()->isTypeContext()
|
||||
? BodyParams[1]->numTopLevelVariables()
|
||||
: BodyParams[0]->numTopLevelVariables();
|
||||
auto Name = getFullName();
|
||||
assert(!Name || !Name.isSimpleName() && "Must have a simple name");
|
||||
assert(!Name || (Name.getArgumentNames().size() == NumParams));
|
||||
#endif
|
||||
|
||||
for (unsigned i = 0; i != NumParamPatterns; ++i)
|
||||
ArgParamsRef[i] = ArgParams[i];
|
||||
for (unsigned i = 0; i != NumParamPatterns; ++i)
|
||||
|
||||
Reference in New Issue
Block a user