File tree Expand file tree Collapse file tree
Sources/PrincipleMacros/Builders/Declarations/Common
Tests/PrincipleMacrosTests/Syntax/Extensions Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,4 +32,8 @@ extension DeclBuilder {
3232 public var preferredAccessControlLevel : AccessControlLevel ? {
3333 nil
3434 }
35+
36+ public var inheritedAvailability : AttributeListSyntax ? {
37+ basicDeclaration. availability? . trimmed. withTrailingNewline
38+ }
3539}
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ internal struct AvailabilityTests {
3939 let decl : DeclSyntax = """
4040 #if os(macOS)
4141 @MainActor
42+ @available(macOS 26, *)
4243 #else
4344 @Observable
4445 @available(iOS 26, *)
@@ -48,6 +49,7 @@ internal struct AvailabilityTests {
4849
4950 let expectation = """
5051 #if os(macOS)
52+ @available(macOS 26, *)
5153 #else
5254 @available(iOS 26, *)
5355 #endif
You can’t perform that action at this time.
0 commit comments