Skip to content

Commit 010f867

Browse files
committed
Fix up the hack that allows labeled function types in macro signatures.
This whole thing needs to be rethought, but for now, unbreak the build.
1 parent 19d1588 commit 010f867

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/Sema/TypeCheckType.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3237,7 +3237,10 @@ TypeResolver::resolveASTFunctionTypeParams(TupleTypeRepr *inputRepr,
32373237

32383238
Identifier argumentLabel;
32393239
Identifier parameterName;
3240-
if (inputRepr->getElement(i).SecondNameLoc.isValid()) {
3240+
if (inputRepr->getElement(i).NameLoc.isValid() &&
3241+
inputRepr->getElement(i).SecondNameLoc.isValid() &&
3242+
inputRepr->getElement(i).NameLoc !=
3243+
inputRepr->getElement(i).SecondNameLoc) {
32413244
argumentLabel = inputRepr->getElement(i).Name;
32423245
parameterName = inputRepr->getElement(i).SecondName;
32433246
} else {

0 commit comments

Comments
 (0)