forked from apple/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Diagnostics] Correctly diagnose misplaced missing argument
Due to the fact that `matchCallArgument` can't and doesn't take types into consideration while matching arguments to parameters, when both arguments are un-labeled, it's impossible to say which one is missing: func foo(_: Int, _: String) {} foo("") In this case first argument is missing, but we end up with two fixes - argument mismatch (for #1) and missing argument (for #2), which is incorrect so it has to be handled specially.
- Loading branch information
Showing
2 changed files
with
124 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters