[SR-6246] Wrong error emitted on first line of block #48796
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
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
md5: bed745963d30c580c34b5e7319f5836e
relates to:
Issue Description:
there is a weird error happening in this code. when i try to multiply an
Int
and aCGFloat
and assign it to aCGFloat
, 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 aproof
one:
block, then instead of that error, i get anargument 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.
The text was updated successfully, but these errors were encountered: