Kotlin / Kotlin/dataframe

Experimental collection literal construction bug

Open
#1,840 0 comments 1 reaction 0 assignees View on GitHub
API bug research
Dominant language
Kotlin
Stars
1.1k
Forks
83
Avg merge
4d 12h
Merged PRs (30d)
30

Description

Enabling: https://kotlinlang.org/docs/whatsnew-eap.html#support-for-collection-literals

https://youtrack.jetbrains.com/issue/KT-43871/Collection-literals

```kt
val df = dataFrameOf(
"fruits" to ["apple", "banana", "cherry"],
"veggies" to ["carrot", "broccoli", "spinach"],
"animals" to ["dog", "cat", "bird"],
)
```
```
e: tmp.kt:7:14 Overload resolution ambiguity between candidates:
fun dataFrameOf(vararg columns: Pair>): DataFrame
fun dataFrameOf(vararg columns: Pair>): DataFrame
```

This works:
```kt
val df = dataFrameOf(
"fruits" to ["apple", "banana", "cherry"],
"veggies" to ["carrot", "broccoli", "spinach"],
"animals" to listOf("dog", "cat", "bird"),
)
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the ambiguity with the collection-literal example and inspect the dataFrameOf overloads shown in the error. Compare this with the working listOf example; done means collection literals select an unambiguous dataFrameOf overload while preserving the existing listOf behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.