@@ -567,7 +567,7 @@ ERROR(ambiguous_module_type,none,
567
567
" ambiguous type name %0 in module %1" , (Identifier, Identifier))
568
568
ERROR(use_nonmatching_operator,none,
569
569
" %0 is not a %select{binary|prefix unary|postfix unary}1 operator" ,
570
- (Identifier , unsigned ))
570
+ (DeclBaseName , unsigned ))
571
571
ERROR(broken_associated_type_witness,none,
572
572
" reference to invalid associated type %0 of type %1" , (DeclName, Type))
573
573
@@ -652,7 +652,7 @@ ERROR(invalid_arg_count_for_operator,none,
652
652
ERROR(operator_in_local_scope,none,
653
653
" operator functions can only be declared at global or in type scope" , ())
654
654
ERROR(nonstatic_operator_in_type,none,
655
- " operator %0 declared in type %1 must be 'static'" , (Identifier , Type))
655
+ " operator %0 declared in type %1 must be 'static'" , (DeclBaseName , Type))
656
656
ERROR(nonfinal_operator_in_class,none,
657
657
" operator %0 declared in non-final class %1 must be 'final'" ,
658
658
(Identifier, Type))
@@ -723,10 +723,10 @@ ERROR(did_not_call_function_value,none,
723
723
())
724
724
ERROR(did_not_call_function,none,
725
725
" function %0 was used as a property; add () to call it" ,
726
- (Identifier ))
726
+ (DeclBaseName ))
727
727
ERROR(did_not_call_method,none,
728
728
" method %0 was used as a property; add () to call it" ,
729
- (Identifier ))
729
+ (DeclBaseName ))
730
730
731
731
ERROR(init_not_instance_member,none,
732
732
" 'init' is a member of the type; use 'type(of: ...)' to initialize "
@@ -782,13 +782,13 @@ ERROR(optional_chain_isnt_chaining,none,
782
782
ERROR(pattern_in_expr,none,
783
783
" %0 cannot appear in an expression" , (PatternKind))
784
784
NOTE(note_call_to_operator,none,
785
- " in call to operator %0" , (Identifier ))
785
+ " in call to operator %0" , (DeclBaseName ))
786
786
NOTE(note_call_to_func,none,
787
- " in call to function %0" , (Identifier ))
787
+ " in call to function %0" , (DeclBaseName ))
788
788
NOTE(note_call_to_initializer,none,
789
789
" in call to initializer" , ())
790
790
NOTE(note_init_parameter,none,
791
- " in initialization of parameter %0" , (Identifier ))
791
+ " in initialization of parameter %0" , (DeclBaseName ))
792
792
793
793
794
794
ERROR(missing_nullary_call,none,
@@ -1520,10 +1520,10 @@ NOTE(optional_req_near_match_accessibility,none,
1520
1520
// Protocols and existentials
1521
1521
ERROR(assoc_type_outside_of_protocol,none,
1522
1522
" associated type %0 can only be used with a concrete type or "
1523
- " generic parameter base" , (Identifier ))
1523
+ " generic parameter base" , (DeclBaseName ))
1524
1524
ERROR(typealias_outside_of_protocol,none,
1525
1525
" typealias %0 can only be used with a concrete type or "
1526
- " generic parameter base" , (Identifier ))
1526
+ " generic parameter base" , (DeclBaseName ))
1527
1527
1528
1528
ERROR(circular_protocol_def,none,
1529
1529
" circular protocol inheritance %0" , (StringRef))
@@ -1571,7 +1571,7 @@ ERROR(requires_same_concrete_type,none,
1571
1571
" generic signature requires types %0 and %1 to be the same" , (Type, Type))
1572
1572
ERROR(protocol_typealias_conflict, none,
1573
1573
" typealias %0 requires types %1 and %2 to be the same" ,
1574
- (Identifier , Type, Type))
1574
+ (DeclBaseName , Type, Type))
1575
1575
WARNING(redundant_same_type_to_concrete,none,
1576
1576
" redundant same-type constraint %0 == %1" , (Type, Type))
1577
1577
NOTE(same_type_redundancy_here,none,
@@ -1639,22 +1639,22 @@ NOTE(multiple_override_prev,none,
1639
1639
" %0 previously overridden here" , (DeclName))
1640
1640
1641
1641
ERROR(override_unavailable,none,
1642
- " cannot override %0 which has been marked unavailable" , (Identifier ))
1642
+ " cannot override %0 which has been marked unavailable" , (DeclBaseName ))
1643
1643
ERROR(override_unavailable_msg, none,
1644
1644
" cannot override %0 which has been marked unavailable: %1" ,
1645
- (Identifier , StringRef))
1645
+ (DeclBaseName , StringRef))
1646
1646
1647
1647
ERROR(override_less_available,none,
1648
1648
" overriding %0 must be as available as declaration it overrides" ,
1649
- (Identifier ))
1649
+ (DeclBaseName ))
1650
1650
1651
1651
ERROR(override_accessor_less_available,none,
1652
1652
" overriding %0 for %1 must be as available as declaration it overrides" ,
1653
- (DescriptiveDeclKind, Identifier ))
1653
+ (DescriptiveDeclKind, DeclBaseName ))
1654
1654
1655
1655
ERROR(override_let_property,none,
1656
1656
" cannot override immutable 'let' property %0 with the getter of a 'var'" ,
1657
- (Identifier ))
1657
+ (DeclBaseName ))
1658
1658
1659
1659
1660
1660
ERROR(override_not_accessible,none,
@@ -1699,12 +1699,12 @@ ERROR(override_property_type_mismatch,none,
1699
1699
" property %0 with type %1 cannot override a property with type %2" ,
1700
1700
(Identifier, Type, Type))
1701
1701
ERROR(override_with_stored_property,none,
1702
- " cannot override with a stored property %0" , (Identifier ))
1702
+ " cannot override with a stored property %0" , (DeclBaseName ))
1703
1703
ERROR(observing_readonly_property,none,
1704
- " cannot observe read-only property %0; it can't change" , (Identifier ))
1704
+ " cannot observe read-only property %0; it can't change" , (DeclBaseName ))
1705
1705
ERROR(override_mutable_with_readonly_property,none,
1706
1706
" cannot override mutable property with read-only property %0" ,
1707
- (Identifier ))
1707
+ (DeclBaseName ))
1708
1708
ERROR(override_argument_name_mismatch,none,
1709
1709
" argument names for %select{method|initializer}0 %1 do not match those "
1710
1710
" of overridden %select{method|initializer}0 %2" ,
@@ -1921,7 +1921,7 @@ ERROR(property_behavior_protocol_no_initStorage,none,
1921
1921
(Type, Type))
1922
1922
ERROR(property_behavior_unknown_requirement,none,
1923
1923
" property behavior protocol %0 has non-behavior requirement %1" ,
1924
- (Identifier, Identifier ))
1924
+ (Identifier, DeclBaseName ))
1925
1925
NOTE(property_behavior_unknown_requirement_here,none,
1926
1926
" declared here" , ())
1927
1927
NOTE(self_conformance_required_by_property_behavior,none,
@@ -2367,21 +2367,21 @@ ERROR(self_assignment_prop,none,
2367
2367
" assigning a property to itself" , ())
2368
2368
ERROR(property_use_in_closure_without_explicit_self,none,
2369
2369
" reference to property %0 in closure requires explicit 'self.' to make"
2370
- " capture semantics explicit" , (Identifier ))
2370
+ " capture semantics explicit" , (DeclBaseName ))
2371
2371
ERROR(method_call_in_closure_without_explicit_self,none,
2372
2372
" call to method %0 in closure requires explicit 'self.' to make"
2373
- " capture semantics explicit" , (Identifier ))
2373
+ " capture semantics explicit" , (DeclBaseName ))
2374
2374
ERROR(implicit_use_of_self_in_closure,none,
2375
2375
" implicit use of 'self' in closure; use 'self.' to make"
2376
2376
" capture semantics explicit" , ())
2377
2377
ERROR(capture_before_declaration,none,
2378
- " cannot capture %0 before it is declared" , (Identifier ))
2378
+ " cannot capture %0 before it is declared" , (DeclBaseName ))
2379
2379
ERROR(transitive_capture_before_declaration,none,
2380
2380
" cannot capture %0, which would use %1 before it is declared" ,
2381
- (Identifier, Identifier ))
2381
+ (DeclBaseName, DeclBaseName ))
2382
2382
NOTE(transitive_capture_through_here,none,
2383
2383
" %0, declared here, captures %1" ,
2384
- (Identifier, Identifier ))
2384
+ (DeclBaseName, DeclBaseName ))
2385
2385
2386
2386
ERROR(closure_implicit_capture_without_noescape,none,
2387
2387
" escaping closures can only capture inout parameters explicitly by value" ,
@@ -2424,18 +2424,18 @@ NOTE(add_self_to_type,none,
2424
2424
2425
2425
WARNING(warn_unqualified_access,none,
2426
2426
" use of %0 treated as a reference to %1 in %2 %3" ,
2427
- (Identifier , DescriptiveDeclKind, DescriptiveDeclKind, DeclName))
2427
+ (DeclBaseName , DescriptiveDeclKind, DescriptiveDeclKind, DeclName))
2428
2428
NOTE(fix_unqualified_access_member,none,
2429
2429
" use 'self.' to silence this warning" , ())
2430
2430
NOTE(fix_unqualified_access_top_level,none,
2431
2431
" use '%0' to reference the %1" ,
2432
- (StringRef, DescriptiveDeclKind, Identifier ))
2432
+ (StringRef, DescriptiveDeclKind, DeclBaseName ))
2433
2433
NOTE(fix_unqualified_access_top_level_multi,none,
2434
2434
" use '%0' to reference the %1 in module %2" ,
2435
- (StringRef, DescriptiveDeclKind, Identifier ))
2435
+ (StringRef, DescriptiveDeclKind, DeclBaseName ))
2436
2436
2437
2437
ERROR(unsupported_special_decl_ref, none,
2438
- " referencing %0 as a function value is not implemented" , (Identifier ))
2438
+ " referencing %0 as a function value is not implemented" , (DeclBaseName ))
2439
2439
2440
2440
WARNING(bitcasting_away_noescape, none,
2441
2441
" 'unsafeBitCast' from non-escaping function type %0 to escaping "
@@ -2518,20 +2518,20 @@ NOTE(silence_optional_in_interpolation_segment_call,none,
2518
2518
2519
2519
ERROR(invalid_noescape_use,none,
2520
2520
" non-escaping %select{value|parameter}1 %0 may only be called" ,
2521
- (Identifier , bool ))
2521
+ (DeclBaseName , bool ))
2522
2522
NOTE(noescape_autoclosure,none,
2523
2523
" parameter %0 is implicitly non-escaping because it was declared @autoclosure" ,
2524
- (Identifier ))
2524
+ (DeclBaseName ))
2525
2525
NOTE(noescape_parameter,none,
2526
2526
" parameter %0 is implicitly non-escaping" ,
2527
- (Identifier ))
2527
+ (DeclBaseName ))
2528
2528
2529
2529
ERROR(closure_noescape_use,none,
2530
2530
" closure use of non-escaping parameter %0 may allow it to escape" ,
2531
- (Identifier ))
2531
+ (DeclBaseName ))
2532
2532
ERROR(decl_closure_noescape_use,none,
2533
2533
" declaration closing over non-escaping parameter %0 may allow it to escape" ,
2534
- (Identifier ))
2534
+ (DeclBaseName ))
2535
2535
ERROR(passing_noescape_to_escaping,none,
2536
2536
" passing non-escaping parameter %0 to function expecting an @escaping closure" ,
2537
2537
(Identifier))
@@ -2544,7 +2544,7 @@ ERROR(general_noescape_to_escaping,none,
2544
2544
2545
2545
ERROR(capture_across_type_decl,none,
2546
2546
" %0 declaration cannot close over value %1 defined in outer scope" ,
2547
- (DescriptiveDeclKind, Identifier ))
2547
+ (DescriptiveDeclKind, DeclBaseName ))
2548
2548
2549
2549
// ------------------------------------------------------------------------------
2550
2550
// Type Check Statements
@@ -3323,12 +3323,12 @@ ERROR(fixed_layout_attr_on_internal_type,
3323
3323
none, " '@_fixed_layout' attribute can only be applied to '@_versioned' "
3324
3324
" or public declarations, but %0 is "
3325
3325
" %select{private|fileprivate|internal|%error|%error}1" ,
3326
- (Identifier , Accessibility))
3326
+ (DeclBaseName , Accessibility))
3327
3327
3328
3328
ERROR(versioned_attr_with_explicit_accessibility,
3329
3329
none, " '@_versioned' attribute can only be applied to internal "
3330
3330
" declarations, but %0 is %select{private|fileprivate|%error|public|open}1" ,
3331
- (Identifier , Accessibility))
3331
+ (DeclBaseName , Accessibility))
3332
3332
3333
3333
ERROR(versioned_attr_in_protocol,none,
3334
3334
" '@_versioned' attribute cannot be used in protocols" , ())
@@ -3373,7 +3373,7 @@ ERROR(inlineable_stored_property,
3373
3373
ERROR(inlineable_decl_not_public,
3374
3374
none, " '@_inlineable' attribute can only be applied to public declarations, "
3375
3375
" but %0 is %select{private|fileprivate|internal|%error|%error}1" ,
3376
- (Identifier , Accessibility))
3376
+ (DeclBaseName , Accessibility))
3377
3377
3378
3378
// ------------------------------------------------------------------------------
3379
3379
// @_specialize diagnostics
0 commit comments