[tests][lldb] Added a reproducer for #KT-61131
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
// KIND: STANDALONE_LLDB
|
||||
// LLDB_TRACE: kt61131.txt
|
||||
// FILE: kt61131-1.kt
|
||||
class FooImpl : Foo {
|
||||
override fun bar() = "zzz"
|
||||
}
|
||||
|
||||
fun call_bar(foo: Foo) {
|
||||
val s1 = foo.bar()
|
||||
val s2 = foo.bar()
|
||||
println(s1 + s2)
|
||||
}
|
||||
|
||||
fun main() {
|
||||
call_bar(FooImpl())
|
||||
}
|
||||
|
||||
// FILE: kt61131-2.kt
|
||||
interface Foo {
|
||||
fun bar(): String
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
> b call_bar
|
||||
> r
|
||||
> s
|
||||
> s
|
||||
> bt
|
||||
* thread #1, [..] stop reason = step in
|
||||
* frame #0: [..]`kfun:Foo#bar(){}kotlin.String-trampoline at kt61131-2.kt:20:5
|
||||
frame #1: [..]`kfun:#call_bar(foo=[..]){} at kt61131-1.kt:9:18
|
||||
frame #2: [..]`kfun:#main(){} at kt61131-1.kt:15:5
|
||||
frame #3: [..]`Konan_start(args=[..]) at [..]
|
||||
frame #4: [..]
|
||||
frame #5: [..]
|
||||
> s
|
||||
> bt
|
||||
* thread #1, [..] stop reason = step in
|
||||
* frame #0: [..]`kfun:FooImpl#bar(_this=[..]]){}kotlin.String at kt61131-1.kt:5:14
|
||||
frame #1: [..]`kfun:Foo#bar(){}kotlin.String-trampoline at kt61131-2.kt:20:5
|
||||
frame #2: [..]`kfun:#call_bar(foo=[..]){} at kt61131-1.kt:9:18
|
||||
frame #3: [..]`kfun:#main(){} at kt61131-1.kt:15:5
|
||||
frame #4: [..]`Konan_start(args=[..]) at [..]
|
||||
frame #5: [..]
|
||||
frame #6: [..]
|
||||
> q
|
||||
|
||||
Generated
+6
@@ -110,4 +110,10 @@ public class LldbTestGenerated extends AbstractNativeBlackBoxTest {
|
||||
public void testKt47198WithBody() throws Exception {
|
||||
runTest("native/native.tests/testData/lldb/kt47198WithBody.kt");
|
||||
}
|
||||
|
||||
@Test
|
||||
@TestMetadata("kt61131.kt")
|
||||
public void testKt61131() throws Exception {
|
||||
runTest("native/native.tests/testData/lldb/kt61131.kt");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user