@@ -2363,6 +2363,18 @@ ERROR(extension_access_with_conformances,none,
2363
2363
ERROR(experimental_tuple_extension,none,
2364
2364
" tuple extensions are experimental" ,
2365
2365
())
2366
+ ERROR(tuple_extension_wrong_type,none,
2367
+ " tuple extension must be written as extension of %0" , (Type))
2368
+ ERROR(tuple_extension_one_conformance,none,
2369
+ " tuple extension must declare conformance to exactly one protocol" , ())
2370
+ ERROR(tuple_extension_extra_requirement,none,
2371
+ " tuple extension cannot require that %0 "
2372
+ " %select{conforms to|subclasses|is the same type as|%error|%error}1 %2" ,
2373
+ (Type, unsigned , Type))
2374
+ ERROR(tuple_extension_missing_requirement,none,
2375
+ " tuple extension must require that %0 conforms to %1" , (Type, Type))
2376
+ ERROR(tuple_extension_nested_type,none,
2377
+ " type %0 cannot be nested in tuple extension" , (const NominalTypeDecl *))
2366
2378
ERROR(extension_metatype,none,
2367
2379
" cannot extend a metatype %0" , (Type))
2368
2380
ERROR(extension_placeholder,none,
@@ -2731,10 +2743,23 @@ NOTE(ambiguous_witnesses_wrong_name,none,
2731
2743
NOTE(no_witnesses_type,none,
2732
2744
" protocol requires nested type %0; add nested type %0 for conformance" ,
2733
2745
(const AssociatedTypeDecl *))
2734
- NOTE(default_associated_type_req_fail,none,
2746
+ NOTE(no_witnesses_type_tuple,none,
2747
+ " protocol requires nested type %0; add type alias %0 with underlying type %1 "
2748
+ " for conformance" ,
2749
+ (const AssociatedTypeDecl *, Type))
2750
+ NOTE(default_associated_type_unsatisfied_conformance,none,
2751
+ " default type %0 for associated type %1 (from protocol %2) "
2752
+ " does not conform to %3" ,
2753
+ (Type, const AssociatedTypeDecl *, Type, Type))
2754
+ NOTE(default_associated_type_unsatisfied_superclass,none,
2755
+ " default type %0 for associated type %1 (from protocol %2) "
2756
+ " does not inherit from %3" ,
2757
+ (Type, const AssociatedTypeDecl *, Type, Type))
2758
+ NOTE(default_associated_type_tuple,none,
2735
2759
" default type %0 for associated type %1 (from protocol %2) "
2736
- " does not %select{inherit from|conform to}4 %3" ,
2737
- (Type, const AssociatedTypeDecl *, Type, Type, bool ))
2760
+ " is unsuitable for tuple conformance; the associated type requirement "
2761
+ " must be fulfilled by a type alias with underlying type %3" ,
2762
+ (Type, const AssociatedTypeDecl *, Type, Type))
2738
2763
ERROR(associated_type_access,none,
2739
2764
" associated type in "
2740
2765
" %select{a private|a fileprivate|an internal|a package|a public|%error}0 protocol "
@@ -2762,10 +2787,19 @@ WARNING(associated_type_not_usable_from_inline_warn,none,
2762
2787
NOTE(bad_associated_type_deduction,none,
2763
2788
" unable to infer associated type %0 for protocol %1" ,
2764
2789
(const AssociatedTypeDecl *, const ProtocolDecl *))
2765
- NOTE(associated_type_deduction_witness_failed,none,
2790
+ NOTE(associated_type_deduction_unsatisfied_conformance,none,
2791
+ " candidate would match and infer %0 = %1 if %1 "
2792
+ " conformed to %2" ,
2793
+ (const AssociatedTypeDecl *, Type, Type))
2794
+ NOTE(associated_type_deduction_unsatisfied_superclass,none,
2766
2795
" candidate would match and infer %0 = %1 if %1 "
2767
- " %select{inherited from|conformed to}3 %2" ,
2768
- (const AssociatedTypeDecl *, Type, Type, bool ))
2796
+ " inherited from %2" ,
2797
+ (const AssociatedTypeDecl *, Type, Type))
2798
+ NOTE(associated_type_deduction_tuple,none,
2799
+ " cannot infer %0 = %1 in tuple conformance because "
2800
+ " the associated type requirement must be fulfilled by a type alias with "
2801
+ " underlying type %2" ,
2802
+ (const AssociatedTypeDecl *, Type, Type))
2769
2803
NOTE(associated_type_witness_conform_impossible,none,
2770
2804
" candidate can not infer %0 = %1 because %1 "
2771
2805
" is not a nominal type and so can't conform to %2" ,
@@ -2856,9 +2890,17 @@ NOTE(protocol_witness_enum_case_payload, none,
2856
2890
2857
2891
NOTE(protocol_witness_type,none,
2858
2892
" possibly intended match" , ())
2859
- NOTE(protocol_witness_nonconform_type ,none,
2893
+ NOTE(protocol_type_witness_unsatisfied_conformance ,none,
2860
2894
" possibly intended match %0 does not "
2861
- " %select{inherit from|conform to}2 %1" , (Type, Type, bool ))
2895
+ " conform to %1" , (Type, Type))
2896
+ NOTE(protocol_type_witness_unsatisfied_superclass,none,
2897
+ " possibly intended match %0 does not "
2898
+ " inherit from %1" , (Type, Type))
2899
+ NOTE(protocol_type_witness_tuple,none,
2900
+ " possibly intended match %0 is unsuitable for tuple conformance; "
2901
+ " the associated type requirement must be fulfilled by a type alias "
2902
+ " with underlying type %1" ,
2903
+ (Type, Type))
2862
2904
2863
2905
NOTE(protocol_witness_circularity,none,
2864
2906
" candidate references itself" , ())
0 commit comments