[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,56 @@
class First {
val x: String
init {
use(this) // NPE! Leaking this
x = foo() // NPE! Own function
}
fun foo() = x
}
fun use(first: First) = first.x.hashCode()
abstract class Second {
val x: String
init {
use(this) // Leaking this in non-final
x = bar() // Own function in non-final
foo() // Non-final function call
}
private fun bar() = foo()
abstract fun foo(): String
}
fun use(second: Second) = second.x
class SecondDerived : Second() {
val y = x // null!
override fun foo() = y
}
open class Third {
open var x: String
constructor() {
x = "X" // Non-final property access
}
}
class ThirdDerived : Third() {
override var x: String = "Y"
set(arg) { field = "$arg$y" }
val y = ""
}
class Fourth {
val x: String
get() = y
val y = x // null!
}