Pseudocode: Implement computation of expected type predicates
This commit is contained in:
@@ -7,15 +7,15 @@ class Delegate {
|
||||
== get ==
|
||||
fun get(_this: Any, p: PropertyMetadata): Int = 0
|
||||
---------------------
|
||||
0 <v2> NEW()
|
||||
0 <v2>: Int NEW()
|
||||
=====================
|
||||
== a ==
|
||||
val a = Delegate()
|
||||
---------------------
|
||||
Delegate() <v0> NEW()
|
||||
Delegate() <v0>: Delegate NEW()
|
||||
=====================
|
||||
== b ==
|
||||
val b by a
|
||||
---------------------
|
||||
a <v0> NEW()
|
||||
a <v0>: * NEW()
|
||||
=====================
|
||||
|
||||
@@ -8,6 +8,6 @@ class C {
|
||||
}
|
||||
}
|
||||
---------------------
|
||||
$a <v1> NEW(<v0>)
|
||||
{ $a } <v1> COPY
|
||||
$a <v1>: * NEW(<v0>)
|
||||
{ $a } <v1>: * COPY
|
||||
=====================
|
||||
|
||||
@@ -8,10 +8,10 @@ abstract class Bar {
|
||||
== foo ==
|
||||
fun foo() = "foo" + this.$bar
|
||||
---------------------
|
||||
"foo" <v0> NEW()
|
||||
this <v1> COPY
|
||||
this <v1> NEW()
|
||||
$bar <v2> NEW(<v1>)
|
||||
this.$bar <v2> COPY
|
||||
"foo" + this.$bar <v3> NEW(<v0>, <v2>)
|
||||
"foo" <v0>: String NEW()
|
||||
this <v1>: {<: Bar} COPY
|
||||
this <v1>: {<: Bar} NEW()
|
||||
$bar <v2>: {<: Any?} NEW(<v1>)
|
||||
this.$bar <v2>: {<: Any?} COPY
|
||||
"foo" + this.$bar <v3>: String NEW(<v0>, <v2>)
|
||||
=====================
|
||||
|
||||
Reference in New Issue
Block a user