Support properties in @PublishedApi bridge quickfix

This commit is contained in:
Mikhael Bogdanov
2016-12-19 16:13:04 +01:00
parent 6ca1d47207
commit c38b55612b
12 changed files with 182 additions and 40 deletions
@@ -0,0 +1,16 @@
// "Replace with generated @PublishedApi bridge call '`access$prop`'" "true"
annotation class Z
open class ABase {
@Z
protected var String.prop: Int
get() = 1
set(field) = {}
inline fun test() {
{
"123".<caret>prop
}()
}
}
@@ -0,0 +1,23 @@
// "Replace with generated @PublishedApi bridge call '`access$test`(...)'" "true"
annotation class Z
open class ABase {
@Z
protected var String.prop: Int
get() = 1
set(field) = {}
inline fun test() {
{
"123".`access$prop`
}()
}
@PublishedApi
internal var String.`access$prop`: Int
get() = prop
set(value) {
prop = value
}
}
@@ -0,0 +1,13 @@
// "Replace with generated @PublishedApi bridge call '`access$prop`'" "true"
annotation class Z
open class ABase {
@Z
protected val prop = 1
inline fun test() {
{
<caret>prop
}()
}
}
@@ -0,0 +1,17 @@
// "Replace with generated @PublishedApi bridge call '`access$prop`'" "true"
annotation class Z
open class ABase {
@Z
protected val prop = 1
inline fun test() {
{
`access$prop`
}()
}
@PublishedApi
internal val `access$prop`: Int
get() = prop
}
@@ -0,0 +1,13 @@
// "Replace with generated @PublishedApi bridge call '`access$prop`'" "true"
annotation class Z
open class ABase {
@Z
protected var prop = 1
inline fun test() {
{
<caret>prop
}()
}
}
@@ -0,0 +1,20 @@
// "Replace with generated @PublishedApi bridge call '`access$prop`'" "true"
annotation class Z
open class ABase {
@Z
protected var prop = 1
inline fun test() {
{
`access$prop`
}()
}
@PublishedApi
internal var `access$prop`: Int
get() = prop
set(value) {
prop = value
}
}