Skip to content

Commit

Permalink
Add a remark on boxing constructor of inline class
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderTvis committed Nov 23, 2022
1 parent fae444b commit 414ca21
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions proposals/annotation-to-mark-accessible-api-for-java.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ A `JvmExpose` annotation should be added to the constructor of `Example` to achi
ExampleKt.f(new Example("42"));
```

Usually, constructor of the inline class is used to perform boxing of it.
Annotating it with `JvmExpose` will lead to creating a new,
synthetic constructor (with placeholder parameter of type `Void`, probably) for boxing,
enabling the default one for user.

### Suspending exposed functions

Functions that are both `suspend` and annotated with `@JvmExpose` should not take a continuation as normal ones
Expand Down

0 comments on commit 414ca21

Please sign in to comment.