Skip to content
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

[SR-7201] Setter should support @available #49749

Closed
norio-nomura opened this issue Mar 15, 2018 · 3 comments
Closed

[SR-7201] Setter should support @available #49749

norio-nomura opened this issue Mar 15, 2018 · 3 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@norio-nomura
Copy link
Contributor

Previous ID SR-7201
Radar rdar://problem/18633725
Original Reporter @norio-nomura
Type Bug
Status Resolved
Resolution Done
Environment

swift-DEVELOPMENT-SNAPSHOT-2018-03-11-a

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee @belkadan
Priority Medium

md5: f47fc710f2b9db5706089d8d8e96e6a3

relates to:

  • SR-7398 Preserve availability on ObjC subscript getters and setters

Issue Description:

e.g.:

struct S {
    var _string: String
    var string: String {
        get { return _string }
        @available(*, unavailable)
        set { _string = newValue }
    }
    init(string: String) {
        _string = string
    }
}

var s = S(string: "foo")
s.string = "bar" // compiler should produce `unavailable` error
@belkadan
Copy link
Contributor

I just started working on this! :-) Here's the part for deprecations: #15102

@belkadan
Copy link
Contributor

A month later, here's unavailable: #15864

@norio-nomura
Copy link
Contributor Author

I confirmed with swift-DEVELOPMENT-SNAPSHOT-2018-04-12-a-osx.pkg that it works I expected!👍
Thanks! 😃

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

2 participants