Skip to content

Commit

Permalink
Merge pull request #245 from ahoppen/ahoppen/accessor-block
Browse files Browse the repository at this point in the history
Adjustments for refactoring of representation of Accessors in SwiftSyntax
  • Loading branch information
ahoppen committed Aug 1, 2023
2 parents d4f0bea + 7c45ab5 commit 80509c4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions SwiftEvolve/Sources/SwiftEvolve/DeclContext.swift
Original file line number Diff line number Diff line change
Expand Up @@ -365,17 +365,17 @@ extension VariableDeclSyntax: Decl {
// each individual binding (or, arguably, each individual bound property)
// is stored or not stored.
return bindings.allSatisfy { binding in
guard let accessor = binding.accessor else {
guard let accessorBlock = binding.accessorBlock else {
return true
}
switch Syntax(accessor).as(SyntaxEnum.self) {
case .codeBlock(_):
switch accessorBlock.accessors {
case .getter:
// There's a computed getter.
return false

case .accessorBlock(let accessorBlock):
case .accessors(let accessors):
// Check the individual accessors.
return accessorBlock.accessors.allSatisfy { accessor in
return accessors.allSatisfy { accessor in
switch accessor.accessorKind.text {
case "willSet", "didSet":
// These accessors are allowed on stored properties.
Expand Down

0 comments on commit 80509c4

Please sign in to comment.