Skip to content

[4.2] SILGen: Cope with overloads when emitting artificial main for @UIApplicationMain. #18056

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

jckarter
Copy link
Contributor

Explanation: Overloading UIApplicationMain in the UIKit overlay would cause an assertion failure.

Scope: Allows a compatibility break introduced by changes to the iOS SDK to be handled in the overlay.

Issue: rdar://problem/42352695

Risk: Low. Replaces an assertion failure on overloading with a check to filter out non-ObjC-defined declarations of UIApplicationMain.

Testing: Swift CI, compatibility suite

Reviewed by: @slavapestov

…icationMain.

The overlay may add overloads for UIApplicationMain for various reasons. When we generate the special `main` implementation for a `@UIApplicationMain` class, we want to call the original function from Objective-C, so pick that one where there are multiple overloads to choose from. Fixes rdar://problem/42352695.
@jckarter
Copy link
Contributor Author

@swift-ci Please test

@jckarter
Copy link
Contributor Author

@swift-ci Please test source compatibility

@jckarter
Copy link
Contributor Author

jckarter commented Jul 19, 2018

The source compat suite "failed" with a bunch of UPASSes. Expected? Do we have known breakage due to the UIApplicationMain issue? The compatibility suite passed with the master branch version of this patch.

@jckarter
Copy link
Contributor Author

@swift-ci Please nominate

@jckarter jckarter merged commit 6f77689 into swiftlang:swift-4.2-branch Jul 19, 2018
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.

1 participant