Partial body resolve works for local Nothing functions + does not go inside local functions and classes
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
Resolve target: value-parameter val p: kotlin.String?
|
||||
Skipped statements:
|
||||
@@ -0,0 +1,22 @@
|
||||
open class C(p: Int) {
|
||||
open fun f(){}
|
||||
}
|
||||
|
||||
fun foo(p: String?) {
|
||||
val o = object : Runnable {
|
||||
override fun run() {
|
||||
if (p == null) return
|
||||
print(p.size)
|
||||
}
|
||||
}
|
||||
|
||||
val c = object : C(p!!.size) {
|
||||
override fun f() {
|
||||
super.f()
|
||||
if (p == null) return
|
||||
print(p.size)
|
||||
}
|
||||
}
|
||||
|
||||
<caret>p?.size
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
Resolve target: value-parameter val p: kotlin.String?
|
||||
Skipped statements:
|
||||
@@ -0,0 +1,11 @@
|
||||
fun foo(p: String?) {
|
||||
class LocalClass {
|
||||
fun f(): String? {
|
||||
if (p == null) return null
|
||||
print(p.size)
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
<caret>p?.size
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
Resolve target: value-parameter val p: kotlin.String?
|
||||
Skipped statements:
|
||||
if (p == null) return null
|
||||
print(p.size)
|
||||
return ""
|
||||
@@ -0,0 +1,9 @@
|
||||
fun foo(p: String?) {
|
||||
fun local(): String? {
|
||||
if (p == null) return null
|
||||
print(p.size)
|
||||
return ""
|
||||
}
|
||||
|
||||
<caret>p?.size
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
Resolve target: value-parameter val p: kotlin.String? smart-casted to kotlin.String
|
||||
Skipped statements:
|
||||
@@ -0,0 +1,10 @@
|
||||
fun foo(p: String?, p1: Any?) {
|
||||
if (p1 == null) return
|
||||
|
||||
fun localError(): Nothing = throw Exception()
|
||||
|
||||
if (p == null) {
|
||||
localError()
|
||||
}
|
||||
<caret>p.size
|
||||
}
|
||||
Reference in New Issue
Block a user