Split testdata of #KT-25432 and #KT-29767

This commit is contained in:
Dmitriy Novozhilov
2019-02-07 14:35:33 +03:00
parent 49a42f9434
commit a4d6f72ad1
6 changed files with 27 additions and 11 deletions
@@ -1,18 +1,11 @@
// !WITH_NEW_INFERENCE
// ISSUE: KT-25432
class Data<T>(val s: T)
fun test_1(d: Data<out Any>) {
fun test(d: Data<out Any>) {
if (d.s is String) {
<!OI;DEBUG_INFO_SMARTCAST!>d.s<!>.<!NI;UNRESOLVED_REFERENCE!>length<!>
}
}
fun test_2(a: MutableList<out Int?>?) {
if (a != null) {
val b = <!OI;DEBUG_INFO_SMARTCAST!>a<!>[0] // no SMARTCAST diagnostic
if (b != null) {
<!DEBUG_INFO_SMARTCAST!>b<!>.inc()
}
}
}