Skip to content

Allow final on dynamic members #23790

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

Conversation

aschwaighofer
Copy link
Contributor

@aschwaighofer aschwaighofer commented Apr 4, 2019

Dynamic is about dynamically replacing a method implementiation not
overriding.

rdar://49535048

Dynamic is about dynamically replacing a method implementiation not
overriding.

rdar://49535048
@aschwaighofer aschwaighofer requested a review from DougGregor April 4, 2019 14:28
@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test

@aschwaighofer
Copy link
Contributor Author

Hmm, I missed a digit in the radar number: rdar://49535048

@swift-ci
Copy link
Contributor

swift-ci commented Apr 4, 2019

Build failed
Swift Test OS X Platform
Git Sha - 1b863d6

@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test os x platform

@swift-ci
Copy link
Contributor

swift-ci commented Apr 4, 2019

Build failed
Swift Test OS X Platform
Git Sha - 1b863d6

Copy link
Contributor

@slavapestov slavapestov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this gated on -swift-version 5?

@aschwaighofer
Copy link
Contributor Author

class C {
  @objc
  final dynamic func foo() {
  }
}

Used to be an error.

@aschwaighofer
Copy link
Contributor Author

@swift-ci please test macOS

@slavapestov
Copy link
Contributor

We don’t require a swift version check when loosening existing restrictions. Also we already shipped swift 5 and it wouldn’t make sense to introduce new behavior changes in -swift-version 5 anyway. I would just make this unconditional and remove the diagnostic.

@aschwaighofer
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

swift-ci commented Apr 5, 2019

Build failed
Swift Test Linux Platform
Git Sha - 1b863d6

@swift-ci
Copy link
Contributor

swift-ci commented Apr 5, 2019

Build failed
Swift Test OS X Platform
Git Sha - 1b863d6

@aschwaighofer aschwaighofer merged commit e50af98 into swiftlang:master Apr 5, 2019
@slavapestov
Copy link
Contributor

Thank you for revising, new version looks good.

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.

3 participants