Commit Graph

6 Commits

Author SHA1 Message Date
Slava Pestov
1e35ffff68 Sema: Fix diagnoseRetroactiveConformances() to handle protocol compositions 2025-05-23 14:34:33 -04:00
Doug Gregor
5a0e70a2bc Update diagnostic text to address code review feedback 2024-05-20 22:06:40 -07:00
Allan Shortlidge
a7235380b6 Sema: Only diagnose retroactive conformances once.
A type may conform to a single protocol via multiple inheritance clauses on the
same extension. When this occurs, we must be careful to only diagnose that
conformance as needing `@retroactive` once, or not at all if one of those
clauses is marked `@retroactive`.

Resolves rdar://121479047
2024-02-13 18:03:17 -08:00
Allan Shortlidge
a0b4d6d5b5 Sema: Make "@retroactive attribute does not apply" a warning.
Follow up to https://github.com/apple/swift/pull/71302.

Resolves rdar://122590301
2024-02-08 22:15:59 -08:00
Slava Pestov
09087ccce8 Sema: Diagnose retroactive conditional conformances
Passing in the declared interface type to checkConformance() here
masked a silent failure where if the type declaration was generic
and the conformance conditional, the conditional requirement check
would fail. As a result, we did not diagnose the absence of
@retroactive, nor the unnecessary presence of it.

Since we only care about the existence of some conformance, we
can use lookupConformance() instead.
2024-01-17 13:08:46 -05:00
Harlan Haskins
4ac34a40ea @retroactive conformance syntax and checking (#36068) 2023-10-20 14:27:03 -07:00