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-6988] We sometimes select type checking solutions involving forcing optionals rather than injecting into optionals #49536

Open
rudkx opened this issue Feb 12, 2018 · 1 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

Comments

@rudkx
Copy link
Member

rudkx commented Feb 12, 2018

Previous ID SR-6988
Radar rdar://problem/37475971
Original Reporter @rudkx
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, TypeChecker
Assignee None
Priority Medium

md5: c71fe7102ca4a79518d188deac717bcf

Issue Description:

Almost certainly a regression due to my recent changes for IUOs.

I removed the solver score keeping track of forced optionals thinking that the favored disjunction choice would deal with that, but that's not the case if we have overloads like this:

func f(x: Int?, y: Int?) {}
func f(x: Int, y: Int) {}

var x: Int! = nil
var y: Int = 2

f(x: x, y: y)
@rudkx
Copy link
Member Author

rudkx commented Feb 12, 2018

@swift-ci create

@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

1 participant