Skip to content

Commit

Permalink
Seal the protocol factory interface
Browse files Browse the repository at this point in the history
The only subtype should be the generated interface which is itself open to new subtypes.
  • Loading branch information
JakeWharton committed Jul 30, 2024
1 parent 0fbfeb6 commit bf06f42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ New:
- Source-based schema parser is now the default. Can be disabled in your schema module with `redwood { useFir = false }`.

Changed:
- Nothing yet!
- `ProtocolFactory` interface is now sealed as arbitrary subtypes were never supported. Only schema-generated subtypes should be used.

Fixed:
- Nothing yet!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import kotlin.native.ObjCName
* @see HostProtocolAdapter
*/
@ObjCName("ProtocolFactory", exact = true)
public interface ProtocolFactory<W : Any> {
public sealed interface ProtocolFactory<W : Any> {
public val widgetSystem: WidgetSystem<W>
}

Expand Down

0 comments on commit bf06f42

Please sign in to comment.