Skip to content

Commit 0ab0498

Browse files
committed
Remove Spurious Line Start Condition From Closure Signature Effect Parsing
Fixes #725 rdar://99669872
1 parent 6cd32e4 commit 0ab0498

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Sources/SwiftParser/Expressions.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1991,7 +1991,6 @@ extension Parser.Lookahead {
19911991
mutating func consumeEffectsSpecifiers() {
19921992
var loopProgress = LoopProgressCondition()
19931993
while self.currentToken.isEffectsSpecifier
1994-
&& !self.currentToken.isAtStartOfLine
19951994
&& loopProgress.evaluate(currentToken) {
19961995
self.consumeAnyToken()
19971996
}

Tests/SwiftParserTest/Types.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,12 @@ final class TypeTests: XCTestCase {
3232
DiagnosticSpec(message: "Unexpected text '..' found in function type")
3333
])
3434
}
35+
36+
func testClosureSignatures() throws {
37+
AssertParse("""
38+
{ ()
39+
throws -> Void in }
40+
""",
41+
{ $0.parseClosureExpression() })
42+
}
3543
}

0 commit comments

Comments
 (0)