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-6246] Wrong error emitted on first line of block #48796

Open
swift-ci opened this issue Oct 28, 2017 · 1 comment
Open

[SR-6246] Wrong error emitted on first line of block #48796

swift-ci opened this issue Oct 28, 2017 · 1 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

Comments

@swift-ci
Copy link
Collaborator

Previous ID SR-6246
Radar https://bugreport.apple.com/web/?problemID=35235556
Original Reporter pvinis (JIRA User)
Type Bug

Attachment: Download

Environment

macOS 10.13

Xcode 9.0.1 (9A1004)

this project was made for ios 11 sdk, using swift 4.

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

md5: bed745963d30c580c34b5e7319f5836e

relates to:

  • SR-11379 Type mismatch in trailing closure gives "Argument passed to call that takes no arguments"

Issue Description:

there is a weird error happening in this code. when i try to multiply an Int and a CGFloat and assign it to a CGFloat, i get an error that the binary operator * is not working there. that is a correct error. but when i do the same as the first line in a proof one: block, then instead of that error, i get an argument passed to call that takes no arguments.

correct error

wrong error

if i put a print as the first line i get the correct error, but if i dont have the print, i get a wrong error.

also, if i dont have the proof() function, i always get the correct error. so i guess somehow this proof() with proof(one:two🙂 confuses swift in a funny way.

i also reported it as an RxSwift's github issue initially, but it ended up being a bug with swift.

thank you.

@belkadan
Copy link
Contributor

belkadan commented Nov 1, 2017

cc @xedin

@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

2 participants