Skip to content

Commit b89ef78

Browse files
committed
Adding final to public API is API-stable.
Client code can't override or subclass a `public` declaration already, so although the ABI differs, the API is the same whether something is `final` or not.
1 parent d8f5b20 commit b89ef78

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

include/swift/AST/Attr.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ DECL_ATTR(available, Available,
126126
CONTEXTUAL_SIMPLE_DECL_ATTR(final, Final,
127127
OnClass | OnFunc | OnAccessor | OnVar | OnSubscript |
128128
DeclModifier |
129-
ABIBreakingToAdd | ABIBreakingToRemove | APIBreakingToAdd | APIStableToRemove,
129+
ABIBreakingToAdd | ABIBreakingToRemove | APIStableToAdd | APIStableToRemove,
130130
2)
131131
DECL_ATTR(objc, ObjC,
132132
OnAbstractFunction | OnClass | OnProtocol | OnExtension | OnVar |

test/api-digester/Outputs/Cake.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ cake: TypeAlias TChangesFromIntToString.T has underlying type change from Swift.
4040
/* Decl Attribute changes */
4141
cake: Enum IceKind is now without @frozen
4242
cake: Func C1.foo1() is now not static
43-
cake: Func FinalFuncContainer.NewFinalFunc() is now with final
4443
cake: Func HasMutatingMethodClone.foo() has self access kind changing from Mutating to NonMutating
4544
cake: Func S1.foo1() has self access kind changing from NonMutating to Mutating
4645
cake: Func S1.foo3() is now static

0 commit comments

Comments
 (0)