Add test methods and data base on raw fir builder test data

This commit is contained in:
Ivan Cilcic
2019-08-15 00:45:00 +03:00
committed by Mikhail Glukhikh
parent fd8205e317
commit 8047aa22a4
50 changed files with 1664 additions and 0 deletions
@@ -0,0 +1,42 @@
class Some {
// Int
// │
fun foo(): Int = 1
fun bar(): Int {
// fun (Some).foo(): Int
// │
return this.foo()
}
// Some
// │
val instance: Some
get() = this@Some
fun String.extension(): Int {
// fun (Some).bar(): Int
// │ fun (Int).plus(Int): Int
// │ │ val (String).length: Int
// │ │ │
return this@Some.bar() + this.length
}
}
// fun (Some).bar(): Int
// │
fun Some.extension() = this.bar()
fun test(some: Some): Int {
// fun <T, R> with(Some, Some.() -> Int): Int
// │ test.some: Some
// │ │ with@0
// │ │ │
return with(some) {
// fun (Some).foo(): Int
// │ fun (Int).plus(Int): Int
// │ │ fun Some.extension(): Int
// │ │ │
this.foo() + this@with.extension()
}
}