Skip to content

Error parsing new context in kotlin 2.2.0 #912

@alekseytomin

Description

@alekseytomin

Project example: https://github.com/alekseytomin/ktlint-context

code:

fun main() {
    with("test") {
        print()
    }
}

context(x: String)
fun print() {
    println(x)
}

Check:

 >./gradlew ktlintCheck                                               

> Task :runKtlintCheckOverMainSourceSet FAILED
7:10 Expecting comma or ')'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions