File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -9502,9 +9502,8 @@ ParserResult<MacroDecl> Parser::parseDeclMacro(DeclAttributes &attributes) {
9502
9502
} else {
9503
9503
// Parameter list.
9504
9504
SmallVector<Identifier, 2 > namePieces;
9505
- DefaultArgumentInfo defaultArgs;
9506
9505
auto parameterResult = parseSingleParameterClause (
9507
- ParameterContextKind::Macro, &namePieces, &defaultArgs );
9506
+ ParameterContextKind::Macro, &namePieces, nullptr );
9508
9507
status |= parameterResult;
9509
9508
parameterList = parameterResult.getPtrOrNull ();
9510
9509
Original file line number Diff line number Diff line change @@ -134,3 +134,8 @@ func testExternalMacroOutOfPlace() {
134
134
let _: Int = #externalMacro( module: " A " , type: " B " )
135
135
// expected-error@-1{{macro 'externalMacro' can only be used to define another macro}}
136
136
}
137
+
138
+ @freestanding ( expression)
139
+ public macro macroWithDefaults( _: Int = 17 ) = #externalMacro( module: " A " , type: " B " )
140
+ // expected-error@-1{{default arguments are not allowed in macros}}
141
+ // expected-warning@-2{{external macro implementation type 'A.B' could not be found for macro 'macroWithDefaults'}}
You can’t perform that action at this time.
0 commit comments