We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2bfd6a4 + 445ef28 commit ef033f4Copy full SHA for ef033f4
Sources/SwiftParser/Lookahead.swift
@@ -266,7 +266,7 @@ extension Parser.Lookahead {
266
}
267
268
// If we don't have attributes, then it cannot be an accessor block.
269
- if nextToken.rawTokenKind != .atSign {
+ guard self.peek(isAt: .atSign) else {
270
return false
271
272
Tests/SwiftParserTest/DeclarationTests.swift
@@ -3831,4 +3831,16 @@ final class UsingDeclarationTests: ParserTestCase {
3831
)
3832
3833
3834
+
3835
+ func testAccessorBlockAfterPatternBindingDeclWithAttribute() {
3836
+ assertParse(
3837
+ """
3838
+ var x: Int = foo()
3839
+ {
3840
+ @available(*, deprecated)
3841
+ didSet {}
3842
+ }
3843
3844
+ )
3845
3846
0 commit comments