[FIR-TEST] Add new testdata generated after changes in previous commit

This commit is contained in:
Dmitriy Novozhilov
2019-12-11 16:16:22 +03:00
parent e9c02a1cca
commit 2536fa0cd5
4578 changed files with 104067 additions and 1 deletions
@@ -0,0 +1,10 @@
fun test(a: Any?) {
if (a == null) return
a.hashCode()
val b = a
b.hashCode()
val c: Any? = a
c.hashCode()
}
@@ -0,0 +1,16 @@
// KT-6118 Redundant type cast can be not redundant?
fun foo(o: Any) {
if (o is String) {
val s = o as String
s.length
}
}
fun foo1(o: Any) {
if (o is String) {
o.length
val s = o
s.length
}
}
@@ -0,0 +1,15 @@
fun test(a: Any?, flag: Boolean, x: Any?) {
if (a !is String) return
a.length
val b: Any?
if (flag) {
b = a
b.length
}
else {
b = x
b.<!UNRESOLVED_REFERENCE!>length<!>()
}
}
@@ -0,0 +1,15 @@
fun test(a: Any?, flag: Boolean, x: Any?) {
if (a == null) return
a.hashCode()
val b: Any?
if (flag) {
b = a
b.hashCode()
}
else {
b = x
b.hashCode()
}
}
@@ -0,0 +1,12 @@
fun test(a: Any?) {
when (a) {
is String -> {
val s = a
s.length
}
"" -> {
val s = a
s.hashCode()
}
}
}