Add tests for element -> pseudo-value mapping
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
== Delegate ==
|
||||
class Delegate {
|
||||
fun get(_this: Any, p: PropertyMetadata): Int = 0
|
||||
}
|
||||
---------------------
|
||||
=====================
|
||||
== get ==
|
||||
fun get(_this: Any, p: PropertyMetadata): Int = 0
|
||||
---------------------
|
||||
0 <v2> NEW()
|
||||
=====================
|
||||
== a ==
|
||||
val a = Delegate()
|
||||
---------------------
|
||||
Delegate <v0> NEW()
|
||||
Delegate() <v0> COPY
|
||||
=====================
|
||||
== b ==
|
||||
val b by a
|
||||
---------------------
|
||||
a <v0> NEW()
|
||||
=====================
|
||||
@@ -0,0 +1,13 @@
|
||||
== C ==
|
||||
class C {
|
||||
val a: Int
|
||||
get() = 1
|
||||
|
||||
{
|
||||
$a
|
||||
}
|
||||
}
|
||||
---------------------
|
||||
$a <v0> NEW()
|
||||
{ $a } <v0> COPY
|
||||
=====================
|
||||
@@ -0,0 +1,17 @@
|
||||
== Bar ==
|
||||
abstract class Bar {
|
||||
abstract var bar : String
|
||||
fun foo() = "foo" + this.$bar
|
||||
}
|
||||
---------------------
|
||||
=====================
|
||||
== foo ==
|
||||
fun foo() = "foo" + this.$bar
|
||||
---------------------
|
||||
"foo" <v0> NEW()
|
||||
+ <v3> NEW(<v0>, <v2>)
|
||||
this <v1> NEW()
|
||||
$bar <v2> NEW(<v1>)
|
||||
this.$bar <v2> COPY
|
||||
"foo" + this.$bar <v3> COPY
|
||||
=====================
|
||||
Reference in New Issue
Block a user