Step 17: callable property calls
This commit is contained in:
1 parent
0b94b46d40
commit
b2d5897aa8
3 files changed
+24
-7
No files matched your search
@@ -159,6 +159,18 @@ class BytecodeRecentOpsTest {
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun callablePropertyCall() = runTest {
|
||||
eval(
|
||||
"""
|
||||
class C { var f = { x -> x + 1 } }
|
||||
val c = C()
|
||||
val r = (c.f)(2)
|
||||
assertEquals(3, r)
|
||||
""".trimIndent()
|
||||
)
|
||||
}
|
||||
|
||||
@Test
|
||||
fun qualifiedThisValueRef() = runTest {
|
||||
eval(
|
||||
|
||||
Reference in new issue
Block a user