FE: Add test for KT-56227 (to confirm it's fixed)

This commit is contained in:
Mikhail Glukhikh
2023-01-27 19:09:19 +01:00
committed by teamcity
parent ba3f21e125
commit 8bc2aaa295
6 changed files with 76 additions and 0 deletions
@@ -0,0 +1,30 @@
// FIR_IDENTICAL
// WITH_REFLECT
import kotlin.reflect.KProperty0
data class MyPattern(
val name: String,
val conservation: String?,
val awake: Double,
val brainwt: Double?,
val bodywt: Double,
)
internal inline fun <reified T> Iterable<T>.ggplot4(
x: T.() -> KProperty0<*>,
y: T.() -> KProperty0<*>,
) {
// build df from data
val map = map { x(it) to y(it) }
map.first().first.name
TODO("do something meaningful")
}
fun main() {
listOf<MyPattern>().ggplot4(
x = { ::conservation },
y = { ::bodywt }
)
}