Merge pull request #34556 from beccadax/mod-squad-2

[SE-0491] Implement lookup and diagnostics for module selectors (MyMod::someName)
This commit is contained in:
Becca Royal-Gordon
2025-10-28 16:00:26 -07:00
committed by GitHub
50 changed files with 1396 additions and 198 deletions

View File

@@ -1146,6 +1146,10 @@ ERROR(no_module_type,none,
"no type named %0 in module %1", (DeclNameRef, Identifier))
ERROR(ambiguous_module_type,none,
"ambiguous type name %0 in module %1", (DeclNameRef, Identifier))
ERROR(module_selector_dependent_member_type_not_allowed,none,
"module selector is not allowed on generic member type; associated types "
"with the same name are merged instead of shadowing one another",
())
ERROR(use_nonmatching_operator,none,
"%0 is not a %select{binary|prefix unary|postfix unary}1 operator",
(DeclNameRef, unsigned))
@@ -1191,6 +1195,16 @@ ERROR(cannot_find_type_in_cast_expression,none,
"type-casting operator expects a type on its right-hand side (got: %kind0)", (const ValueDecl *))
ERROR(cannot_find_type_in_scope_did_you_mean,none,
"cannot find type %0 in scope; did you mean to use '%1'?", (DeclNameRef, StringRef))
ERROR(wrong_module_selector,none,
"%0 is not imported through module %1", (DeclName, Identifier))
NOTE(note_change_module_selector,none,
"did you mean module %0?", (Identifier))
NOTE(note_remove_module_selector_local_decl,none,
"did you mean the local declaration?", ())
NOTE(note_remove_module_selector_outer_type,none,
"did you mean an outer type member?", ())
NOTE(note_add_explicit_self_with_module_selector,none,
"did you mean the member of 'self'?", ())
NOTE(note_typo_candidate_implicit_member,none,
"did you mean the implicitly-synthesized %kindbase0?", (const ValueDecl *))
NOTE(note_remapped_type,none,
@@ -8013,7 +8027,7 @@ ERROR(expected_macro_expansion_expr,PointsToFirstBadToken,
ERROR(expected_macro_expansion_decls,PointsToFirstBadToken,
"expected macro expansion to produce a declaration", ())
ERROR(macro_undefined,PointsToFirstBadToken,
"no macro named %0", (DeclName))
"no macro named %0", (DeclNameRef))
ERROR(external_macro_not_found,none,
"external macro implementation type '%0.%1' could not be found for "
"macro %2; %3", (StringRef, StringRef, DeclName, StringRef))