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-2838] renamification creates ambiguity #45432

Open
mattneub opened this issue Oct 3, 2016 · 3 comments
Open

[SR-2838] renamification creates ambiguity #45432

mattneub opened this issue Oct 3, 2016 · 3 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@mattneub
Copy link

mattneub commented Oct 3, 2016

Previous ID SR-2838
Radar rdar://problem/26848252
Original Reporter @mattneub
Type Bug
Environment

Xcode 8, Swift 3

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

md5: a3b63c5555daca0d7a3e75cffe52f966

relates to:

  • SR-1408 NSArray indexesOfObjectsPassingTest cannot be called in Swift 3
  • SR-2654 NSAttributedString import creates indistinguishable candidates due to automatic defaulting

Issue Description:

Consider this:

@interface PQFLoader : NSObject
- (void)show;
- (void)showLoader;
@end

Swift ends up with two `show` methods, neither of which can be called because now we have an ambiguity.

The example is not merely theoretical.

@jtbandes
Copy link
Collaborator

What do you think the correct fix is here? Just don't apply renamification if it would create a name that already exists?

@modocache
Copy link
Mannequin

modocache mannequin commented Jan 1, 2017

Is this a duplicate of https://bugs.swift.org/browse/SR-1408 ? That report also concerns ClangImporter behavior that causes ambiguities.

@jtbandes
Copy link
Collaborator

jtbandes commented Jan 1, 2017

I guess it depends whether SR-1408 is occurring because of automatic method importing — or are the optional parameters' default values specified somewhere by hand?

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 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
Projects
None yet
Development

No branches or pull requests

2 participants