Skip to content

Commit 19165b1

Browse files
committed
Allow to use binaryAPI on private constructors.
1 parent 0861c51 commit 19165b1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

content/binary-api.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ There is no precise mechanism to remove a deprecated method from a library witho
4646

4747
Related to discussion in https://github.com/lightbend/mima/discussions/724
4848

49+
### No way to inline reference to private constructors
50+
51+
It is currently impossible to refer to private constructors in inline methods. If users want to access one of those, they must write an accessor explicitly. This extra indirection is undesirable.
52+
4953
## Proposed solution
5054

5155
### High-level overview
@@ -58,7 +62,7 @@ A binary API is a definition that is annotated with `@binaryAPI` or overrides a
5862
This annotation can be placed on `def`, `val`, `lazy val`, `var`, `object`, and `given` definitions.
5963
A binary API will be publicly available in the bytecode.
6064

61-
This annotation cannot be used on `private`/`private[this]` definitions.
65+
This annotation cannot be used on `private`/`private[this]` definitions. With the exception of class constructors.
6266

6367
Removing this annotation from a non-public definition is a binary incompatible change.
6468

0 commit comments

Comments
 (0)