Add test methods and data base on raw fir builder test data
This commit is contained in:
committed by
Mikhail Glukhikh
parent
fd8205e317
commit
8047aa22a4
@@ -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()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user