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-2971] Whole Module Optimization: Convenience initializer not calling subclass initializer #45561

Closed
swift-ci opened this issue Oct 17, 2016 · 3 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself optimized only Flag: An issue whose reproduction requires optimized compilation

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-2971
Radar rdar://problem/28882879
Original Reporter fumoboy007 (JIRA User)
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Environment

Swift 3.0.1, Xcode 8.1 (8B62), macOS Sierra

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, Miscompile, OptimizedOnly
Assignee @eeckstein
Priority Medium

md5: ecff97bffce8a90c3aeb23958a7a64d5

Issue Description:

See attached sample project.

There is an open class in the embedded framework called MyView. It has a convenience initializer. There is a subclass of MyView called OverrideView in the main app. OverrideView overrides the designated/required initializers of MyView.

When Whole Module Optimization is turned off for the framework:

  • Invoking the convenience initializer calls the appropriate initializer in OverrideView. ✅

When Whole Module Optimization is turned on for the framework:

  • Invoking the convenience initializer calls the initializer of MyView. ❌
@eeckstein
Copy link
Member

fixed in 35916a2

@belkadan
Copy link
Contributor

This was fixed, although the fix didn't make it into Swift 3.0.1 or 3.0.2, which only had limited changes from 3.0.

@swift-ci
Copy link
Collaborator Author

Comment by Darren Mo (JIRA)

Oh, OK. 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 optimized only Flag: An issue whose reproduction requires optimized compilation
Projects
None yet
Development

No branches or pull requests

3 participants