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-3527] Ambiguous reference instead of type mismatch #46115

Open
swift-ci opened this issue Jan 2, 2017 · 2 comments
Open

[SR-3527] Ambiguous reference instead of type mismatch #46115

swift-ci opened this issue Jan 2, 2017 · 2 comments
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself type checker Area → compiler: Semantic analysis

Comments

@swift-ci
Copy link
Contributor

swift-ci commented Jan 2, 2017

Previous ID SR-3527
Radar None
Original Reporter Reitzig (JIRA User)
Type Bug

Attachment: Download

Environment

Swift 3.0.1
XCode 8.2

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, TypeChecker
Assignee @xedin
Priority Medium

md5: 77812a49ecb4bc4ad35a7f99c26e490f

Issue Description:

Consider this piece of code:

@swift-ci
Copy link
Contributor Author

swift-ci commented Jul 4, 2017

Comment by Raphael (JIRA)

Another example:

@xedin
Copy link
Contributor

xedin commented Jul 5, 2017

Reitzig (JIRA User) It looks like I've recently improved handling of the situation mentioned in the description, updated message is going to be this:

error: cannot convert return expression of type 'Double' to return type 'Int'
              return (Double(self.nom) / Double(self.den)).rounded(.up)
                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
                     Int(                                              )

Regarding example you've posted today - the problem here is that method remove is generic and we are currently pretty bad at matching generic parameters to concrete arguments, I'm planing to take a look at it shortly and see if we could improve the situation, will keep you posted...

@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 type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

2 participants