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-2368] Poor error message when doing math on Ints where a Double is expected. #44975

Closed
swift-ci opened this issue Aug 16, 2016 · 0 comments
Closed
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself diagnostics QoI Bug: Diagnostics Quality of Implementation type checker Area → compiler: Semantic analysis

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-2368
Radar None
Original Reporter bobspryn (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate
Environment

Xcode 8 beta 5, Swift 3

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

md5: 0d699c61189a4c568c3a4a473ac74ade

duplicates:

  • SR-2208 Binary operator '/' cannot be applied to two 'Int' operands

Issue Description:

For example:

`let test: Double = Int(60) * 60`

Produces the error: "Binary operator '*' cannot be applied to two 'Int' operands"

This was especially confusing when using a method expecting a Double (such that the type wasn't immediately visible.)

@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 diagnostics QoI Bug: Diagnostics Quality of Implementation type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

1 participant