File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
lib/Macros/Sources/ObservationMacros Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -338,7 +338,7 @@ public struct ObservationTrackedMacro: AccessorMacro {
338338 return [ ]
339339 }
340340
341- guard let container = context. lexicalContext [ 0 ] . as ( ClassDeclSyntax . self) else {
341+ guard context. lexicalContext [ 0 ] . as ( ClassDeclSyntax . self) != nil else {
342342 return [ ]
343343 }
344344
@@ -406,11 +406,11 @@ extension ObservationTrackedMacro: PeerMacro {
406406 ) throws -> [ DeclSyntax ] {
407407 guard let property = declaration. as ( VariableDeclSyntax . self) ,
408408 property. isValidForObservation,
409- let identifier = property. identifier? . trimmed else {
409+ property. identifier? . trimmed != nil else {
410410 return [ ]
411411 }
412412
413- guard let container = context. lexicalContext [ 0 ] . as ( ClassDeclSyntax . self) else {
413+ guard context. lexicalContext [ 0 ] . as ( ClassDeclSyntax . self) != nil else {
414414 return [ ]
415415 }
416416
You can’t perform that action at this time.
0 commit comments