Add test about resolution to klib from non/common platforms

This commit is contained in:
Jinseong Jeon
2024-02-08 11:34:17 -08:00
committed by Space Team
parent 7f33097634
commit 6c062b0cea
4 changed files with 88 additions and 6 deletions
@@ -0,0 +1,9 @@
package common
import some.example.Person
fun greetEachOther(people: Collection<Person>) {
for (person in people) {
person.greet()
}
}
@@ -0,0 +1,19 @@
package jvmTest
import common.greetEachOther
import some.example.Person
private class MyPerson(
name: String
) : Person(name) {
override fun greet() = "Hi"
}
fun test() {
greetEachOther(
listOf(
Person("Alice"),
MyPerson("Bob"),
)
)
}
@@ -0,0 +1,7 @@
package some.example
open class Person(
val name: String
) {
open fun greet() = "Hello"
}