-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfoptimized onlyFlag: An issue whose reproduction requires optimized compilationFlag: An issue whose reproduction requires optimized compilation
Description
| 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. ❌
Metadata
Metadata
Assignees
Labels
bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfoptimized onlyFlag: An issue whose reproduction requires optimized compilationFlag: An issue whose reproduction requires optimized compilation