Kotlin / dataframe

Structured data processing in Kotlin
https://kotlin.github.io/dataframe/overview.html
Apache License 2.0
772 stars 48 forks source link

Meaningless warnings for some `KProperty<DataRow<C>>` extension functions: `CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION` #569

Open Jolanrensen opened 5 months ago

Jolanrensen commented 5 months ago

There are some functions introduced by https://github.com/Kotlin/dataframe/pull/372 which throw compiler/front-end warnings that can be ignored: CANDIDATE_CHOSEN_USING_OVERLOAD_RESOLUTION_BY_LAMBDA_ANNOTATION. This warning is caused by a workaround for this YouTrack issue (and this).

image

This warning only occurs in places where there exist overloads for both KProperty<DataRow<C>> and KProperty<C> with a lambda argument. To prevent clashes on the JVM, one of the two functions is annotated with @JvmName(). Then, to make calling both functions possible, the non-DataRow overload is annotated with @OverloadResolutionByLambdaReturnType, which causes the warning to appear on the DataRow overload.