Properly cast right-hand side value for inline property setter

#KT-22649 Fixed
This commit is contained in:
Mikhael Bogdanov
2018-09-06 14:15:14 +02:00
parent 5cb8108eec
commit da93ff1a30
7 changed files with 46 additions and 1 deletions
+17
View File
@@ -0,0 +1,17 @@
// FILE: 1.kt
var result = ""
inline var apx:Int
get() = 0
set(value) { result = if (value == 1) "OK" else "fail" }
// FILE: 2.kt
fun test(s: Int?) {
apx = s!!
}
fun box() : String {
test(1)
return result
}