Merge pull request #30423 from AnthonyLatsis/se-0267-additions

[SE-0267] Improvements (Ep. 1)
This commit is contained in:
Anthony Latsis
2020-03-21 08:59:13 +03:00
committed by GitHub
11 changed files with 103 additions and 45 deletions

View File

@@ -1658,9 +1658,6 @@ ERROR(redundant_class_requirement,none,
"redundant 'class' requirement", ())
ERROR(late_class_requirement,none,
"'class' must come first in the requirement list", ())
ERROR(where_toplevel_nongeneric,none,
"'where' clause cannot be attached to non-generic "
"top-level declaration", ())
ERROR(where_inside_brackets,none,
"'where' clause next to generic parameters is obsolete, "
"must be written following the declaration's type", ())

View File

@@ -1575,7 +1575,7 @@ NOTE(unstable_mangled_name_add_objc,none,
"for compatibility with existing archives, use '@objc' "
"to record the Swift 3 runtime name", ())
// Generic types
// Generic declarations
ERROR(unsupported_type_nested_in_generic_function,none,
"type %0 cannot be nested in generic function %1",
(Identifier, DeclName))
@@ -1591,6 +1591,12 @@ ERROR(unsupported_type_nested_in_protocol_extension,none,
ERROR(unsupported_nested_protocol,none,
"protocol %0 cannot be nested inside another declaration",
(Identifier))
ERROR(where_nongeneric_ctx,none,
"'where' clause on non-generic member declaration requires a "
"generic context", ())
ERROR(where_nongeneric_toplevel,none,
"'where' clause cannot be applied to a non-generic top-level "
"declaration", ())
// Type aliases
ERROR(type_alias_underlying_type_access,none,
@@ -2755,10 +2761,6 @@ ERROR(dynamic_self_stored_property_init,none,
ERROR(dynamic_self_default_arg,none,
"covariant 'Self' type cannot be referenced from a default argument expression", ())
ERROR(where_nongeneric_ctx,none,
"'where' clause on non-generic member declaration requires a "
"generic context", ())
//------------------------------------------------------------------------------
// MARK: Type Check Attributes
//------------------------------------------------------------------------------