Property <-> Function Conversion: Add/remove 'get'/'is' prefixes automatically

#KT-8812 Fixed
This commit is contained in:
Alexey Sedunov
2015-09-24 13:40:37 +03:00
parent 1b9bbf0bb6
commit 9ec87c01ab
32 changed files with 207 additions and 52 deletions
@@ -3,11 +3,11 @@
annotation class X(val s: String)
class A(val n: Int) {
internal X("1") fun <T : Number> T.foo(): Boolean = toInt() - n > 1
internal X("1") fun <T : Number> T.getFoo(): Boolean = toInt() - n > 1
}
fun test() {
val t = with(A(1)) {
2.5.foo()
2.5.getFoo()
}
}