dataframe icon indicating copy to clipboard operation
dataframe copied to clipboard

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

Open Jolanrensen opened this issue 1 year ago • 0 comments

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.

Jolanrensen avatar Jan 25 '24 12:01 Jolanrensen