Skip to content

Commit

Permalink
Remove test failing on new compiler diagnostic error
Browse files Browse the repository at this point in the history
Multiple labels are forbidden on statements from 2.0.0-Beta4

https://youtrack.jetbrains.com/issue/KT-53629
  • Loading branch information
3flex committed Mar 21, 2024
1 parent fdafe9e commit f8e3817
Showing 1 changed file with 0 additions and 17 deletions.
Expand Up @@ -215,23 +215,6 @@ class UnnecessaryBracesAroundTrailingLambdaSpec(val env: KotlinCoreEnvironment)
assertThat(findings).hasSize(1)
}

@Test
fun `does not report lambda has nested labels`() {
val code = """
fun test() {
foo(bar@ foo@{ bar(it) })
}
fun foo(f: (String) -> Int) {
f("")
}
fun bar(s: String) = s.length
""".trimIndent()
val findings = subject.compileAndLintWithContext(env, code)
assertThat(findings).isEmpty()
}

@Test
fun `does report generic param lambda has braces around it`() {
val code = """
Expand Down

0 comments on commit f8e3817

Please sign in to comment.