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 {
13541354 }
13551355
13561356 let accessors : RawAccessorBlockSyntax ?
1357- if self . at ( . leftBrace)
1357+ if ( self . at ( . leftBrace)
1358+ && ( !self . currentToken. isAtStartOfLine || self . withLookahead ( { $0. atStartOfGetSetAccessor ( ) } ) ) )
13581359 || ( inMemberDeclList && self . at ( anyIn: AccessorDeclSyntax . AccessorSpecifierOptions. self) != nil
13591360 && !self . at ( . keyword( . `init`) ) )
13601361 {
Original file line number Diff line number Diff line change @@ -58,6 +58,18 @@ final class ExpressionTests: ParserTestCase {
5858 }
5959 """
6060 )
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+ )
6173 }
6274
6375 func testTrailingClosures( ) {
You can’t perform that action at this time.
0 commit comments