mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
Test data should be a Kotlin source file with zero or more comments e.g. of the form: '// 1 INVOKEVIRTUAL'. The test then checks that the generated bytecode for this file contains exactly one occurrence of the string 'INVOKEVIRTUAL'
17 lines
232 B
Kotlin
17 lines
232 B
Kotlin
// Check that this code doesn't contains INVOKEVIRTUAL instruction
|
|
class B {
|
|
private fun foo(i: Int = 1) {
|
|
}
|
|
|
|
fun f() {
|
|
foo(2)
|
|
}
|
|
}
|
|
|
|
fun box(): String {
|
|
return "OK"
|
|
}
|
|
|
|
// 0 INVOKEVIRTUAL
|
|
// 3 INVOKESPECIAL
|