Pseudocode: Implement computation of expected type predicates
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
== Bar ==
|
||||
class Bar {
|
||||
}
|
||||
---------------------
|
||||
=====================
|
||||
== Foo ==
|
||||
class Foo() {
|
||||
fun Bar.invoke() {}
|
||||
}
|
||||
---------------------
|
||||
=====================
|
||||
== invoke ==
|
||||
fun Bar.invoke() {}
|
||||
---------------------
|
||||
=====================
|
||||
== foobar ==
|
||||
fun foobar(f: Foo) {
|
||||
Bar().f()
|
||||
}
|
||||
---------------------
|
||||
Bar() <v2>: Bar NEW()
|
||||
f <v1>: Foo NEW()
|
||||
f() <v3>: * NEW(<v1>, <v2>)
|
||||
Bar().f() <v3>: * COPY
|
||||
{ Bar().f() } <v3>: * COPY
|
||||
=====================
|
||||
Reference in New Issue
Block a user