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-6292] Another useless diagnostic #48842

Open
NachoSoto opened this issue Nov 4, 2017 · 4 comments
Open

[SR-6292] Another useless diagnostic #48842

NachoSoto opened this issue Nov 4, 2017 · 4 comments
Assignees
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

@NachoSoto
Copy link
Contributor

Previous ID SR-6292
Radar rdar://problem/59207087
Original Reporter @NachoSoto
Type Bug
Environment

Swift version 4.0.2 (swiftlang-900.0.69.1 clang-900.0.38)

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

md5: 51cee3000f63e3e1718adfc19cd01d7b

Issue Description:

import Foundation
let x: DispatchTime = DispatchTime.now() + .seconds(2) // works
let x: DispatchTime = DispatchTime.now() + .seconds(0.2) // oops, 0.2 is not an Int
error: repl.swift:3:36: error: cannot convert value of type 'DispatchTime' to expected argument type '_.Stride'
let x: DispatchTime = DispatchTime.now() + .seconds(0.2)
                      ~~~~~~~~~~~~~^~~~~

_.Stride what?

@belkadan
Copy link
Contributor

belkadan commented Nov 6, 2017

cc @xedin, @rudkx

@xedin
Copy link
Member

xedin commented Nov 6, 2017

@NachoSoto Thanks for reporting this! We know that diagnostics around contextual types and generics are especially bad currently and I'm working on the direction of trying to change underlying architecture to make it easier to diagnose such cases...

@NachoSoto
Copy link
Contributor Author

👍

@xedin
Copy link
Member

xedin commented Feb 6, 2020

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

No branches or pull requests

3 participants