Skip to content

Commit 103bca2

Browse files
nicolasstuckiodersky
authored andcommitted
Change overriding rules for @publicInBinary
* Change suggestion scala/scala3#18402 (comment) * Changed in scala/scala3@eae8831
1 parent ab1a0a8 commit 103bca2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

content/binary-api.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ title: SIP-52 - Binary APIs
1515
| Feb 27 2023 | Initial Draft |
1616
| Aug 16 2023 | Single Annotation |
1717
| Aug 24 2023 | Change Annotation Name |
18+
| Jan 09 2024 | Change Overload Rules |
1819

1920
## Summary
2021

@@ -73,7 +74,7 @@ This proposal introduces the `@publicInBinary` annotation, and adds a migration
7374

7475
#### `@publicInBinary` annotation
7576

76-
A binary API is a definition that is annotated with `@publicInBinary` or overrides a definition annotated with `@publicInBinary`.
77+
A binary API is a definition that is annotated with `@publicInBinary`.
7778
This annotation can be placed on `def`, `val`, `lazy val`, `var`, `object`, and `given` definitions.
7879
A binary API will be publicly available in the bytecode.
7980

@@ -222,6 +223,7 @@ final class publicInBinary extends scala.annotation.StaticAnnotation
222223
#### `@publicInBinary` annotation
223224

224225
* Only valid on `def`, `val`, `lazy val`, `var`, `object`, and `given`.
226+
* If a definition overrides a `@publicInBinary` definition, it must also be annotated with `@publicInBinary`.
225227
* TASTy will contain references to non-public definitions that are out of scope but `@publicInBinary`. TASTy already allows those references.
226228
* The annotated definitions will be public in the generated bytecode. Definitions should be made public as early as possible in the compiler phases, as this can remove the need to create other accessors. It should be done after we check the accessibility of references.
227229

0 commit comments

Comments
 (0)