Extraction Engine: Respect smart casts applied to "this" references

#KT-7447
This commit is contained in:
Alexey Sedunov
2015-04-14 18:05:46 +03:00
parent aa0930ea60
commit d036edb5c6
6 changed files with 105 additions and 5 deletions
@@ -0,0 +1,17 @@
// SUGGESTED_NAMES: i, getB
// PARAM_DESCRIPTOR: internal fun A.ext(): kotlin.Unit defined in root package
// PARAM_TYPES: B
fun main(args: Array<String>) {
val a: A = B()
a.ext()
}
fun A.ext() {
if (this !is B) return
val b = <selection>foo()</selection>
}
open class A
class B: A() {
fun foo() = 1
}