We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c6caad4 commit bfee080Copy full SHA for bfee080
lib/Macros/Sources/ObservationMacros/ObservableMacro.swift
@@ -275,7 +275,9 @@ extension ObservableMacro: ExtensionMacro {
275
conformingTo protocols: [TypeSyntax],
276
in context: some MacroExpansionContext
277
) throws -> [ExtensionDeclSyntax] {
278
- if protocols.isEmpty {
+ // This method can be called twice - first with an empty `protocols` when
279
+ // no conformance is needed, and second with a `MissingTypeSyntax` instance.
280
+ if protocols.isEmpty || protocols.first!.is(MissingTypeSyntax.self) {
281
return []
282
}
283
0 commit comments