File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -1354,7 +1354,8 @@ extension Parser {
1354
1354
}
1355
1355
1356
1356
let accessors : RawAccessorBlockSyntax ?
1357
- if self . at ( . leftBrace)
1357
+ if ( self . at ( . leftBrace)
1358
+ && ( !self . currentToken. isAtStartOfLine || self . withLookahead ( { $0. atStartOfGetSetAccessor ( ) } ) ) )
1358
1359
|| ( inMemberDeclList && self . at ( anyIn: AccessorDeclSyntax . AccessorSpecifierOptions. self) != nil
1359
1360
&& !self . at ( . keyword( . `init`) ) )
1360
1361
{
Original file line number Diff line number Diff line change @@ -58,6 +58,18 @@ final class ExpressionTests: ParserTestCase {
58
58
}
59
59
"""
60
60
)
61
+
62
+ assertParse (
63
+ """
64
+ func f(x:[Void])
65
+ {
66
+ var y:[[Void]] = x.map { [$0] }
67
+ {
68
+ $0.reserveCapacity(1)
69
+ } (&y[0])
70
+ }
71
+ """
72
+ )
61
73
}
62
74
63
75
func testTrailingClosures( ) {
You can’t perform that action at this time.
0 commit comments