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-6685] failure to diagnose conflicting overloads if parameter is inout #49234

Closed
rudkx opened this issue Jan 1, 2018 · 5 comments
Closed
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@rudkx
Copy link
Member

rudkx commented Jan 1, 2018

Previous ID SR-6685
Radar rdar://problem/36255630
Original Reporter @rudkx
Type Bug
Status Resolved
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee @rudkx
Priority Medium

md5: fe3ae07a679a3b32218464090948afd8

Issue Description:

We fail to diagnose the overloads that take optional vs. IUO below when they are marked inout.

class C {}

func foo(c: C?) {}
func foo(c: C!) {}  // error: invalid redeclaration
func foo(c: C) {}

func bar(c: inout C?) {}
func bar(c: inout C!) {} // no error
func bar(c: inout C) {}
@belkadan
Copy link
Contributor

belkadan commented Jan 2, 2018

@swift-ci create

@rudkx
Copy link
Member Author

rudkx commented Jan 2, 2018

PR: #13680

@rudkx
Copy link
Member Author

rudkx commented Jan 3, 2018

Merged to master: 1385964

@rudkx
Copy link
Member Author

rudkx commented Jan 3, 2018

The change merged in emits a warning and a deprecation note when this happens. When the PR to remove IUOs from the type system goes in, these will go back to being an error.

@rudkx
Copy link
Member Author

rudkx commented Feb 21, 2018

Merged a while back: 1385964

@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