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-1486] @available with override causing <unknown>:0: error #44095

Open
iby opened this issue May 11, 2016 · 0 comments
Open

[SR-1486] @available with override causing <unknown>:0: error #44095

iby opened this issue May 11, 2016 · 0 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@iby
Copy link

iby commented May 11, 2016

Previous ID SR-1486
Radar None
Original Reporter @iby
Type Bug
Additional Detail from JIRA
Votes 1
Component/s Compiler
Labels Bug
Assignee @beccadax
Priority Medium

md5: 1d4a0abb3a38dca9a282c46ffa45567c

is duplicated by:

  • SR-10051 Impossible to override insetsLayoutMarginsFromSafeArea on a project whose IPHONEOS_DEPLOYMENT_TARGET = 10.0

Issue Description:

Trying to override a property with a custom didSet logic, it's that's available only in 10.11. The following fails with <unknown>:0: error: 'highlightState' is only available on OS X 10.11 or newer.

@available(OSX 10.11, *) override public var highlightState: NSCollectionViewItemHighlightState {
    didSet {
        Swift.print(oldValue)
    }
}

Trying to add extra checks interpreted as redundant, however, the below code works.

@available(OSX 10.11, *) override public var highlightState: NSCollectionViewItemHighlightState {
    get {
        return super.highlightState
    }
    set {
        super.highlightState = newValue
    }
}
@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
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

1 participant