Skip to content

Experimental collection literal construction bug #1840

@Jolanrensen

Description

@Jolanrensen

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

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

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<String, BaseColumn<*>>): DataFrame<DataFrameOf_83>
fun dataFrameOf(vararg columns: Pair<String, List<Any?>>): DataFrame<DataFrameOf_83>

This works:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    APIIf it touches our APIbugSomething isn't workingresearchThis requires a deeper dive to gather a better understanding

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions