Extract Function: Extract smart-cast value as parameter
#KT-7576 Fixed
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
// SUGGESTED_NAMES: i, getKm
|
||||
// PARAM_TYPES: kotlin.Int
|
||||
// PARAM_DESCRIPTOR: internal final val meters: kotlin.Int? defined in A
|
||||
class A {
|
||||
val meters: Int? = 1
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val a = A()
|
||||
if (a.meters == null) return
|
||||
val km = <selection>a.meters / 10</selection>
|
||||
}
|
||||
Reference in New Issue
Block a user