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-2558] Default values for parameters in init are not inherited in another module #45163

Closed
swift-ci opened this issue Sep 4, 2016 · 2 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself regression swift 3.0

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Sep 4, 2016

Previous ID SR-2558
Radar None
Original Reporter diegosanchezr (JIRA User)
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, 3.0Regression
Assignee @DougGregor
Priority Medium

md5: c46d2ff397cf421f1c6bc4e705d02f18

Issue Description:

Framework1:

open class Foo {
    let color: UIColor
    public init(color: UIColor = .white) {
        self.color = color
    }
}

Framework 2

import Framework1
class Bar: Foo {
}

print(Bar()) // Doesn't compile with swift-DEVELOPMENT-SNAPSHOT-2016-09-03-a.xctoolchain

Compiles with swift-DEVELOPMENT-SNAPSHOT-2016-09-01-a.xctoolchain
Doesn't compile with swift-DEVELOPMENT-SNAPSHOT-2016-09-03-a.xctoolchain

@belkadan
Copy link
Contributor

belkadan commented Sep 6, 2016

cc @DougGregor

@slavapestov
Copy link
Member

This works in Xcode 8.3.

@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 regression swift 3.0
Projects
None yet
Development

No branches or pull requests

4 participants