Skip to content

Commit 038eae4

Browse files
Adding SR-13359 diagnostics to localization yaml files and minor comment
1 parent e8f1784 commit 038eae4

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

lib/Sema/CSDiagnostics.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,7 @@ class MissingMemberFailure : public InvalidMemberRefFailure {
10791079
/// e.g
10801080
/// ```swift
10811081
/// let tuple: (Int, Int) = (0, 0)
1082-
/// _ = tuple[0]
1082+
/// _ = tuple[0] // -> tuple.0.
10831083
/// ```
10841084
bool diagnoseForSubscriptMemberWithTupleBase() const;
10851085

localization/diagnostics/en.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2967,6 +2967,16 @@
29672967
value of type %0 has no property or method named 'subscript'; did you
29682968
mean to use the subscript operator?
29692969
2970+
- id: could_not_find_subscript_member_tuple
2971+
msg: >-
2972+
cannot access element using subscript for tuple type %0;
2973+
use '.' notation instead
2974+
2975+
- id: could_not_find_subscript_member_tuple_did_you_mean_use_dot
2976+
msg: >-
2977+
cannot access element using subscript for tuple type %0;
2978+
did you mean to use '.%1'?
2979+
29702980
- id: could_not_find_enum_case
29712981
msg: >-
29722982
enum type %0 has no case %1; did you mean %2?

0 commit comments

Comments
 (0)