File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -1284,12 +1284,13 @@ extension Parser {
1284
1284
// Parse the sequence of unqualified-names.
1285
1285
var elements = [ RawObjcNamePieceSyntax] ( )
1286
1286
do {
1287
- var flags : DeclNameOptions = . compoundNames
1287
+ var flags : DeclNameOptions = [ ]
1288
1288
var keepGoing : RawTokenSyntax ? = nil
1289
1289
var loopProgress = LoopProgressCondition ( )
1290
1290
repeat {
1291
1291
// Parse the next name.
1292
- let ( name, _) = self . parseDeclNameRef ( flags)
1292
+ let ( name, args) = self . parseDeclNameRef ( flags)
1293
+ assert ( args == nil , " Found arguments but did not pass argument flag? " )
1293
1294
1294
1295
// After the first component, we can start parsing keywords.
1295
1296
flags. formUnion ( . keywords)
Original file line number Diff line number Diff line change @@ -412,6 +412,12 @@ final class ExpressionTests: XCTestCase {
412
412
DiagnosticSpec ( message: " Expected '}' to end function " ) ,
413
413
]
414
414
)
415
+
416
+ AssertParse ( " #keyPath(#^DIAG^#(b:) " ,
417
+ diagnostics: [
418
+ DiagnosticSpec ( message: " Expected '' in '#keyPath' expression " ) ,
419
+ DiagnosticSpec ( message: " Expected ')' to end '#keyPath' expression " ) ,
420
+ ] )
415
421
}
416
422
417
423
func testMissingArrowInArrowExpr( ) {
You can’t perform that action at this time.
0 commit comments