Can be parameter inspection: use inside function literals is now handled as "property use" #KT-11949 Fixed

This commit is contained in:
Mikhail Glukhikh
2016-04-25 14:53:17 +03:00
committed by Mikhail Glukhikh
parent ae2e3f1811
commit 795b92461e
2 changed files with 17 additions and 1 deletions
+14
View File
@@ -103,3 +103,17 @@ class ModifiedInInit(var x: Int) {
open class UsedInOverride(val x: Int)
class UserInOverride(override val x: Int) : UsedInOverride(x)
// NO
class UsedInLambda(val x: Int) {
init {
run {
val y = x
}
}
}
// NO
class UsedInDelegate(val x: Int) {
val y: Int by lazy {
x * x
}
}