[ConstraintSystem] Downgrade some invalid specialization uses to a warning until Swift 6 language mode

Some invalid specializations were previously allowed by the compiler
and we found some existing code that used that (albeit invalid) syntax,
so we need to stage that error as a warning until Swift 6 language mode
to avoid source compatibility break.

Resolves: rdar://134740240
This commit is contained in:
Pavel Yaskevich
2024-08-29 00:11:01 -07:00
parent 00eee36ea7
commit 2a6cc12a63
8 changed files with 85 additions and 42 deletions

View File

@@ -4606,8 +4606,8 @@ NOTE(duplicated_key_declared_here, none,
"duplicate key declared here", ())
// Generic specializations
ERROR(cannot_explicitly_specialize_generic_function,none,
"cannot explicitly specialize a generic function", ())
ERROR(cannot_explicitly_specialize_function,none,
"cannot explicitly specialize a%select{| generic}0 function", (bool))
ERROR(not_a_generic_type,none,
"cannot specialize non-generic type %0", (Type))
ERROR(not_a_generic_macro,none,