[SE-0470] Include isolated conformance checks for default value expressions

Per SE-0411, we compute the isolation of a default value expression
based on what isolation it requires. Include isolated conformance
checks in this computation, rather than always emitting diagnostics,
so that the combination of isolated default values + isolated
conformances works as expected.

Fixes rdar://150691429.
This commit is contained in:
Doug Gregor
2025-05-12 09:43:11 -07:00
parent 3b3d13c6da
commit 2dacde1a6d
5 changed files with 100 additions and 18 deletions

View File

@@ -1723,7 +1723,8 @@ bool swift::hasLetStoredPropertyWithInitialValue(NominalTypeDecl *nominal) {
});
}
/// Determine whether a synth
/// Determine whether a synthesized requirement for the given conformance
/// should be explicitly marked as 'nonisolated'.
static bool synthesizedRequirementIsNonIsolated(
const NormalProtocolConformance *conformance) {
// @preconcurrency suppresses this.