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-14263] Missing designated init for constructor with default values #56623

Closed
swift-ci opened this issue Feb 22, 2021 · 1 comment
Closed
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. crash Bug: A crash, i.e., an abnormal termination of software run-time crash Bug → crash: Swift code crashed during execution

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-14263
Radar rdar://problem/74604277
Original Reporter odnairy (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate

Attachment: Download

Environment

Xcode 12.4

XCFramework (ios-arm64)

Sample code have to be compiled as a dynamic library with enabled BUILD_LIBRARY_FOR_DISTRIBUTION option.

Additional Detail from JIRA
Votes 0
Component/s
Labels Bug, RunTimeCrash
Assignee None
Priority Medium

md5: ac885643912159cc9275797f06beb9f4

duplicates:

  • SR-13832 Swift 5.3 generates incorrect swift interface file for classes on non-inherited constructors

Issue Description:

The following code compiled as a dynamic framework (tested on iOS) with enabled library evolution:

public class Base {
    public init() {}
}


public class Child: Base {
    let name: String
    
    public init(name: String = "apple-user") {
        self.name = name
    }
}

would crash in runtime on call without build warnings:

_ = Child()
@typesanitizer
Copy link

@swift-ci create

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the crash Bug: A crash, i.e., an abnormal termination of software label Dec 12, 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. crash Bug: A crash, i.e., an abnormal termination of software run-time crash Bug → crash: Swift code crashed during execution
Projects
None yet
Development

No branches or pull requests

3 participants