From f2614aad66e02e64a4a55bdaa35a2f8f57785033 Mon Sep 17 00:00:00 2001 From: Scala Improvement Bot Date: Wed, 17 Jan 2024 00:22:25 +0000 Subject: [PATCH] Update SIPs state --- _sips/sips/binary-api.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/_sips/sips/binary-api.md b/_sips/sips/binary-api.md index 5b7ccdd9d..899730483 100644 --- a/_sips/sips/binary-api.md +++ b/_sips/sips/binary-api.md @@ -12,9 +12,10 @@ title: SIP-52 - Binary APIs | Date | Version | |---------------|------------------------| -| Feb 27 2022 | Initial Draft | -| Aug 16 2022 | Single Annotation | -| Aug 24 2022 | Change Annotation Name | +| Feb 27 2023 | Initial Draft | +| Aug 16 2023 | Single Annotation | +| Aug 24 2023 | Change Annotation Name | +| Jan 09 2024 | Change Overload Rules | ## Summary @@ -73,7 +74,7 @@ This proposal introduces the `@publicInBinary` annotation, and adds a migration #### `@publicInBinary` annotation -A binary API is a definition that is annotated with `@publicInBinary` or overrides a definition annotated with `@publicInBinary`. +A binary API is a definition that is annotated with `@publicInBinary`. This annotation can be placed on `def`, `val`, `lazy val`, `var`, `object`, and `given` definitions. A binary API will be publicly available in the bytecode. @@ -222,6 +223,7 @@ final class publicInBinary extends scala.annotation.StaticAnnotation #### `@publicInBinary` annotation * Only valid on `def`, `val`, `lazy val`, `var`, `object`, and `given`. +* If a definition overrides a `@publicInBinary` definition, it must also be annotated with `@publicInBinary`. * TASTy will contain references to non-public definitions that are out of scope but `@publicInBinary`. TASTy already allows those references. * 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.