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-11395] bad diagnostic something goes wrong in an argument to an overloaded function #53796
Comments
@swift-ci create |
Straight-up crashes on my near-master:
|
Oh, maybe the crash was SR-11394. |
@hborla I think a fix for this problem could be pretty straightforward - use `fixMissingArguments` in `matchCallArguments`, currently it's only covers function conversions (in `matchFunctionTypes`). |
Seems like this is fixed on master the diagnostic produced are note: 'init(how:)' declared here
init(how: String) {}
^
error: missing argument for parameter 'how' in call
Thing().doIt(f(Foo(/* MISSING how: "good" HERE */), Foo(how: "random")))
^ cc @xedin |
@LucianoPAlmeida reports this this has been fixed on master, but it looks like 11.4 has a fix as well. Could you please verify and resolve? |
Attachment: Download
Additional Detail from JIRA
md5: e744518c73cc485f0758f112562c7cc5
Issue Description:
The below program has exactly one error: The argument
how: String
inFoo
's constructor is missing. However the compiler tells us:whilst it's correct that
Pair<L, R>
does not conform toP2
it's extremely misleading.The most frustrating this is that if I rewrite the last line to
the compiler actually gets it:
The text was updated successfully, but these errors were encountered: