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-13936] Misleading diagnostic on trying to initialize CGRect with with Float values. #56333

Open
swift-ci opened this issue Dec 4, 2020 · 2 comments
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

swift-ci commented Dec 4, 2020

Previous ID SR-13936
Radar rdar://problem/71991529
Original Reporter miramirror (JIRA User)
Type Bug

Attachment: Download

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

md5: a3d485f2aa1d2e53ccf0a2f7f88c81eb

Issue Description:

When initiating a CGRect with Float type variables:

let rect = CGRect(x: float, y: float, width: float, height: float)

the error message says:

argument passed to call that takes no arguments

The "Fix" option is simply removing (x: float, y: float, width: float, height: float), which isn't correct and confuses programmers.

@typesanitizer
Copy link

@swift-ci create

@LucianoPAlmeida
Copy link
Collaborator

Using a toolchain from 2020-11-21 I can see diagnostics improved

miramirror (JIRA User) Can you please verify using the latest main snapshot from https://swift.org/download/? Thanks

@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