mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Observation] Create nonisolated conformances to Observable
This is needed to make default-main-actor mode work well with Observable. Fixes rdar://150419628.
This commit is contained in:
@@ -381,7 +381,7 @@ extension ObservableMacro: ExtensionMacro {
|
||||
}
|
||||
|
||||
let decl: DeclSyntax = """
|
||||
extension \(raw: type.trimmedDescription): \(raw: qualifiedConformanceName) {}
|
||||
extension \(raw: type.trimmedDescription): nonisolated \(raw: qualifiedConformanceName) {}
|
||||
"""
|
||||
let ext = decl.cast(ExtensionDeclSyntax.self)
|
||||
|
||||
|
||||
@@ -2152,8 +2152,8 @@ std::optional<unsigned> swift::expandExtensions(CustomAttr *attr,
|
||||
for (auto i : inheritedTypes.getIndices()) {
|
||||
auto constraint =
|
||||
TypeResolution::forInterface(
|
||||
extension->getDeclContext(),
|
||||
TypeResolverContext::GenericRequirement,
|
||||
extension,
|
||||
TypeResolverContext::Inherited,
|
||||
/*unboundTyOpener*/ nullptr,
|
||||
/*placeholderHandler*/ nullptr,
|
||||
/*packElementOpener*/ nullptr)
|
||||
|
||||
Reference in New Issue
Block a user