@@ -119,6 +119,15 @@ extension ASTGenVisitor {
119
119
// return
120
120
}
121
121
122
+ guard
123
+ node. genericArgumentClause == nil ,
124
+ node. trailingClosure == nil ,
125
+ node. additionalTrailingClosures. isEmpty
126
+ else {
127
+ // TODO: Diagnose.
128
+ fatalError ( " #error/#warning with generic specialization " )
129
+ }
130
+
122
131
guard node. arguments. count == 1 ,
123
132
let arg = node. arguments. first,
124
133
arg. label == nil ,
@@ -195,6 +204,15 @@ extension ASTGenVisitor {
195
204
}
196
205
197
206
func generateObjCSelectorExpr( freestandingMacroExpansion node: some FreestandingMacroExpansionSyntax ) -> BridgedExpr {
207
+ guard
208
+ node. genericArgumentClause == nil ,
209
+ node. trailingClosure == nil ,
210
+ node. additionalTrailingClosures. isEmpty
211
+ else {
212
+ // TODO: Diagnose.
213
+ fatalError ( " #selector with generic specialization " )
214
+ }
215
+
198
216
var args = node. arguments [ ... ]
199
217
guard let arg = args. popFirst ( ) else {
200
218
// TODO: Diagnose
@@ -229,6 +247,14 @@ extension ASTGenVisitor {
229
247
}
230
248
231
249
func generateObjCKeyPathExpr( freestandingMacroExpansion node: some FreestandingMacroExpansionSyntax ) -> BridgedExpr {
250
+ guard
251
+ node. genericArgumentClause == nil ,
252
+ node. trailingClosure == nil ,
253
+ node. additionalTrailingClosures. isEmpty
254
+ else {
255
+ // TODO: Diagnose.
256
+ fatalError ( " #keyPath with generic specialization " )
257
+ }
232
258
233
259
var names : [ BridgedDeclNameRef ] = [ ]
234
260
var nameLocs : [ BridgedDeclNameLoc ] = [ ]
0 commit comments