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-1033] #selector disambiguation between foo() and foo(x:) #43645

Closed
swift-ci opened this issue Mar 23, 2016 · 1 comment
Closed

[SR-1033] #selector disambiguation between foo() and foo(x:) #43645

swift-ci opened this issue Mar 23, 2016 · 1 comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-1033
Radar None
Original Reporter radex (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate

Attachment: Download

Environment

Xcode 7.3 / Swift 2.2

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

md5: 55fa88f7219e33ef8d232839e22b9977

duplicates:

  • SR-1016 #selector broken for no-argument initializers and functions

Issue Description:

There are two methods in my class:

@IBAction func delegate() { ... }
func delegate(pop pop: Bool) { ... }

when I tried to reference the first using `#selector(TaskInterfaceController.delegate)` (or `delegate()`), Xcode reports "Ambiguous use of delegate()". But there is no ambiguity.

Workaround: `#selector((TaskInterfaceController.delegate) as TaskInterfaceController -> () -> ())`

@belkadan
Copy link
Contributor

The former syntax (without parens) would be ambiguous, but the latter syntax is being incorrectly rejected.

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

No branches or pull requests

2 participants