Refactoring: inline val / fun now use the common inliner

This prevents their inconsistent work in some situations
NB: breaks three tests if used alone
This commit is contained in:
Mikhail Glukhikh
2017-04-04 19:19:03 +03:00
parent e6fa7356e1
commit 4ef0096d46
11 changed files with 111 additions and 221 deletions
@@ -1,3 +1,3 @@
fun foo() {
val ff = {(it: Int) -> it }
val ff = { it: Int -> it }
}
@@ -1,6 +1,6 @@
fun foo() {
val ff = {
(it: Int) ->
it: Int ->
it
}
}
@@ -1,3 +1,3 @@
fun foo() {
val ff = (({(x: Int) -> x }))
val ff = (({ x: Int -> x }))
}
@@ -1,3 +1,3 @@
fun foo() {
val ff = {(x: Int) -> x }
val ff = { x: Int -> x }
}
@@ -6,5 +6,6 @@ class Class {
}
fun f() {
Class()
println(239)
}
@@ -0,0 +1,5 @@
// ERROR: Cannot perform refactoring.\nVariable length has no initializer
fun foo(s: String) {
val l = s.<caret>length
}