Skip to content

Commit

Permalink
Add motivation for inlining property accessors
Browse files Browse the repository at this point in the history
* Enable `@InlineOnly` properties whose signatures can be changed without affecting the binary compatiblity of a library
* Make reified type parameters available for property accessors

#34
  • Loading branch information
abreslav authored Jul 15, 2016
1 parent 2be7782 commit f9a9246
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion proposals/inline-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ Discussion of this proposal is held in [this issue](https://github.com/Kotlin/KE

Support `inline` modifier for properties that don't have a backing field and accessors of such properties.

## Motivation

* Enable `@InlineOnly` properties whose signatures can be changed without affecting the binary compatiblity of a library
* Make reified type parameters available for property accessors

## Description

We propose to allow the `inline` modifier on properties that do not have a backing field.
Expand Down Expand Up @@ -44,4 +49,4 @@ inline var bar: Bar

In such a case, all accessors are marked `inline` automatically.

Applying `inline` to a property that has a backing field, or its accessor, results in a compile-time error.
Applying `inline` to a property that has a backing field, or its accessor, results in a compile-time error.

0 comments on commit f9a9246

Please sign in to comment.