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-3557] Incorrect function called when defined in extensions #46145

Closed
swift-ci opened this issue Jan 5, 2017 · 1 comment
Closed

[SR-3557] Incorrect function called when defined in extensions #46145

swift-ci opened this issue Jan 5, 2017 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior.

Comments

@swift-ci
Copy link
Collaborator

swift-ci commented Jan 5, 2017

Previous ID SR-3557
Radar None
Original Reporter hpwooten (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate
Additional Detail from JIRA
Votes 0
Component/s
Labels Bug
Assignee None
Priority Medium

md5: ce4b23a7c18498833f2047b6b5f23d39

duplicates:

  • SR-2323 Conflicting scope-private members causes crash

Issue Description:

class Foo {}

extension Foo {
    private func hello() {
        print("hello")
    }

    func a() {
        hello()
    }
}

extension Foo {
    private func hello() {
        print("goodbye")
    }

    func b() {
        hello()
    }
}

let f = Foo()
f.a()
f.b()

Expected:
The console output is:
"hello"
"goodbye"

Observed:
The console output is:
"hello"
"hello"

@belkadan, this may relate to your ticket SR-2323

@belkadan
Copy link
Contributor

belkadan commented Jan 5, 2017

Yeah, I'm going to say it's the same issue. I got an assertion failure because I had assertions enabled; you're seeing a silent miscompile when they're disabled.

@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.
Projects
None yet
Development

No branches or pull requests

2 participants