Skip to content

[5.9] Parse init accessors #1736

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jun 7, 2023

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Jun 6, 2023

Cherry-pick of #1731


This is the SwiftSyntax-side change to swiftlang/swift#66283. Add parsing for init accessors:

struct Wrapper<T> {
  var wrappedValue: T
}

struct S {
  private var _value: Wrapper<Int>
  var value: Int {
    init(newValue) initializes(_value) {
      self._value = Wrapper(wrappedValue: newValue)
    }

    get { _value.wrappedValue }
    set { _value.wrappedValue = newValue }
  }
}

hborla added 6 commits June 6, 2023 12:31
# Conflicts:
#	Sources/SwiftParserDiagnostics/generated/ChildNameForDiagnostics.swift
#	Sources/SwiftSyntax/generated/ChildNameForKeyPath.swift
#	Sources/SwiftSyntax/generated/Keyword.swift
#	Sources/SwiftSyntax/generated/SyntaxAnyVisitor.swift
#	Sources/SwiftSyntax/generated/SyntaxBaseNodes.swift
#	Sources/SwiftSyntax/generated/SyntaxEnum.swift
#	Sources/SwiftSyntax/generated/SyntaxKind.swift
#	Sources/SwiftSyntax/generated/SyntaxRewriter.swift
#	Sources/SwiftSyntax/generated/SyntaxTransform.swift
#	Sources/SwiftSyntax/generated/SyntaxVisitor.swift
#	Sources/SwiftSyntax/generated/raw/RawSyntaxNodes.swift
#	Sources/SwiftSyntax/generated/raw/RawSyntaxValidation.swift
#	Sources/SwiftSyntax/generated/syntaxNodes/SyntaxNodes.swift
# Conflicts:
#	CodeGeneration/Sources/SyntaxSupport/DeclNodes.swift
@xedin xedin requested a review from ahoppen as a code owner June 6, 2023 22:01
@xedin
Copy link
Contributor Author

xedin commented Jun 6, 2023

@ahoppen Thank you for the help with cherry-pick!

@xedin
Copy link
Contributor Author

xedin commented Jun 6, 2023

@swift-ci please test

@xedin xedin merged commit 6db727f into swiftlang:release/5.9 Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants