Skip to content

Kotlin destructuring declarations highlighted as syntax error #884

@SebastianAigner

Description

@SebastianAigner

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

The following valid Kotlin code:

fun fromString(s: String): Passport {
    val fieldsAndValues = s.split(" ", "\n", "\r\n")
    val map = fieldsAndValues.associate {
        val (key, value) = it.split(":")
        key to value
    }
    return Passport(map)
}

is rendered as such:

Screenshot 2023-11-15 at 02 12 15

It seems that Chroma currently doesn't understand Kotlin destructuring declarations.

To Reproduce

See the playground.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions