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-4446] Wrong implementation chosen when invoking generic protocol methods with unlabeled arguments #47023

Open
swift-ci opened this issue Mar 31, 2017 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software run-time crash Bug → crash: Swift code crashed during execution type checker Area → compiler: Semantic analysis

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-4446
Radar rdar://problem/31372307
Original Reporter cbrimhall (JIRA User)
Type Bug

Attachment: Download

Environment

macOS 10.12.3 (16D32)
Xcode 8.3 beta 4 (8W143q)

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

md5: 8467c3c04bb021546c57495b6eded8ff

Issue Description:

Given a protocol with an associated type, if the protocol declares a method with an unlabeled argument of the associated type and is extended with a default implementation, the default implementation will be invoked even when a conforming type provides its own implementation.

See the attached playground for additional notes and an example.

@belkadan
Copy link
Contributor

@swift-ci create

@huonw
Copy link
Mannequin

huonw mannequin commented Mar 31, 2017

Reproduces on the latest master, and seems to also reproduce since at least 3.0 so not a regression.

@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
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 crash Bug: A crash, i.e., an abnormal termination of software run-time crash Bug → crash: Swift code crashed during execution type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

3 participants