Skip to content

Commit 23c29c7

Browse files
committed
Special case accessor names in objects
This is to make migration from auto generated accessors to `@binaryAPIAccessors` easier.
1 parent 1d22f52 commit 23c29c7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

content/binary-api.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ final class binaryAPIAccessor extends scala.annotation.StaticAnnotation
184184

185185
* Only valid on `def`, `val`, `lazy val`, `var`, `object`, and `given`.
186186
* A public accessor will be generated for the annotated definition. This accessor will be named `<fullClassName>$$inline$<definitionName>`.
187+
* If the public accessor is in an object, the accessor will be named `inline$<definitionName>`.
187188

188189
#### Inline
189190

@@ -223,7 +224,7 @@ class B extends A:
223224

224225
## Alternatives
225226

226-
Having alternatives is not a strict requirement for a proposal, but having at least one with carefully exposed pros and cons gives much more weight to the proposal as a whole. -->
227+
Having alternatives is not a strict requirement for a proposal, but having at least one with carefully exposed pros and cons gives much more weight to the proposal as a whole.
227228

228229
### Only add `@binaryAPI`
229230
This would simplify the system and the user interaction with this feature. The drawback is that we could not access `private[this]` definitions in inline code. Users would need to use `private[C]` instead, which could cause name clashes.

0 commit comments

Comments
 (0)