Skip to content

[Diagnostics] Introduce argument-to-parameter mismatch #27063

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

Merged
merged 38 commits into from
Sep 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
0f24f7e
[CSFix] Introduce a fix for argument-to-parameter conversion mismatch
xedin Aug 23, 2019
34a12aa
[Diagnostics] Add generic argument-to-parameter conversion failure
xedin Aug 23, 2019
dfc938b
[Diagnostics] Add a tailored diagnostic for attempt to use optional a…
xedin Aug 23, 2019
f28e674
[Diagnostics] Detect situation when argument would match if it wasn't…
xedin Aug 24, 2019
9d84aab
[ConstraintSystem] Score generic argument-to-parameter mismatch fixes…
xedin Aug 29, 2019
65c966b
[Diagnostics] Port a custom diagnostic for archetype mismatch in argu…
xedin Aug 29, 2019
e06cd0b
[Diagnostics] Tailored diagnostic when argument/parameter mismatch is…
xedin Aug 30, 2019
6d5cf3e
[Diagnostics] Attempt fix-its appropriate for types in argument posit…
xedin Aug 30, 2019
1a57fc4
[ConstraintSystem] Make sure that l-value is preserved in argument po…
xedin Aug 31, 2019
93b39c9
[Diagnostics] Port pattern-matching mismatch diagnostic
xedin Sep 2, 2019
c946b38
[ConstraintSystem] Don't produce argument mismatch fix when pointer c…
xedin Sep 4, 2019
953b9f7
[ConstraintSystem] Fix a situation when argument requires raw represe…
xedin Sep 4, 2019
3d242bd
[ConstraintSystem] Fix a situation when argument requires raw value t…
xedin Sep 4, 2019
08ae9e5
[CSDiag] NFC: Remove obsolete logic which deals with raw representabl…
xedin Sep 4, 2019
446d0f8
[ConstraintSystem] Rate impact of conformance failures based on non-c…
xedin Sep 5, 2019
7960661
[ConstraintSystem] Lift restriction which restricted conformance fixe…
xedin Sep 5, 2019
078c2b6
[CSDiag] NFC: Remove obsolete `CalleeCandidateInfo::diagnoseGenericPa…
xedin Sep 6, 2019
015129c
[Diagnostics] Allow requirement failure to diagnose operators
xedin Sep 6, 2019
7c4c2fb
[CSDiag] NFC: Remove obsolete `diagnoseArgumentGenericRequirements`
xedin Sep 6, 2019
caa3569
[CSDiag] NFC: Remove more obosolete code from `visitApplyExpr`
xedin Sep 6, 2019
a1643d9
[Diagnostics] NFC: Update all of the improved test-cases
xedin Sep 6, 2019
001f462
[Diagnostics] Fix a typo in argument mismatch diagnostic note
xedin Sep 6, 2019
df8d1a0
[ConstraintSystem] Fail comparison if dependent member types couldn't…
xedin Sep 8, 2019
8a4fcaa
[Diagnostics] Don't diagnoses missing `Equatable` in pattern-matching…
xedin Sep 9, 2019
90d725f
[Diagnostics] Add special ambiguity diagnostics for operators
xedin Sep 9, 2019
25d7a07
[ConstraintSystem] Adjust a couple of places not to fail immediately …
xedin Sep 10, 2019
973d58d
[Diagnostics] Provide a tailored diagnostic for operator mismatch on …
xedin Sep 10, 2019
b898eaf
[Diagnostics] Tailored diagnostics for reference equality operator mi…
xedin Sep 11, 2019
b0299f7
[CSSimplify] NFC: Adjust comment about matching dependent types with …
xedin Sep 11, 2019
587d297
[CSDiag] NFC: Remove obsolete fix-it for argument casts from `visitAp…
xedin Sep 12, 2019
26e51e0
[ConstraintSystem] Fix: Try to match argument to element type if para…
xedin Sep 12, 2019
c20e4ac
[Diagnostics] Fix usages of `getChoiceFor`
xedin Sep 13, 2019
afc3408
[ConstraintSystem] De-prioritize missing member fix when base is cont…
xedin Sep 13, 2019
88c39db
[Diagnostics] NFC: Fix improved test-cases related to argument-to-par…
xedin Sep 13, 2019
b7a732e
[Diagnostics] NFC: Add a couple of examples of requirement failures r…
xedin Sep 13, 2019
1cd1f25
[ConstraintSystem] NFC: Fix typo `implact` -> `impact`
xedin Sep 14, 2019
260a482
[Diagnostics] NFC: Adjust some binary operator checks to verify exact…
xedin Sep 14, 2019
1bd4bb9
[Diagnostics] NFC: Restore a test-case with a TODO
xedin Sep 14, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions include/swift/AST/DiagnosticsSema.def
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,11 @@ ERROR(cannot_convert_default_arg_value_nil,none,
ERROR(cannot_convert_argument_value,none,
"cannot convert value of type %0 to expected argument type %1",
(Type,Type))

NOTE(candidate_has_invalid_argument_at_position,none,
"candidate expects value of type %0 at position #%1",
(Type, unsigned))

ERROR(cannot_convert_argument_value_generic,none,
"cannot convert value of type %0 (%1) to expected argument type %2 (%3)",
(Type, StringRef, Type, StringRef))
Expand Down
Loading