JVM IR: Check that we generate callable references in tests

This commit is contained in:
Steven Schäfer
2022-06-13 16:13:42 +02:00
committed by Alexander Udalov
parent 2acfb3a41f
commit 8014712569
9 changed files with 54 additions and 0 deletions
@@ -0,0 +1,8 @@
// The direct invoke optimization silently broke several tests. This test exists to
// ensure that we don't end up optimizing the indirect invokes that are present in the tests.
private fun id(x: String) = x
fun box() = { "O" }.let { it() } + ::id.let { it("K") }
// CHECK_BYTECODE_TEXT
// 2 Function[^.\n]*\.invoke