[FIR] Fix candidate success check by checking if no diagnostic is unsuccessful
Checking the current applicability isn't enough because in the presence of multiple diagnostics, the lowest applicability can be successful but a higher one isn't. #KT-63147 Fixed
This commit is contained in:
committed by
Space Team
parent
0d36462c58
commit
6b7eeec181
@@ -0,0 +1,28 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER, -ERROR_SUPPRESSION
|
||||
@DslMarker
|
||||
annotation class Ann
|
||||
|
||||
@Ann
|
||||
class A {
|
||||
@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE")
|
||||
@kotlin.internal.LowPriorityInOverloadResolution
|
||||
fun a() = 1
|
||||
}
|
||||
|
||||
@Ann
|
||||
class B {
|
||||
fun b() = 2
|
||||
}
|
||||
|
||||
fun foo(x: A.() -> Unit) {}
|
||||
fun bar(x: B.() -> Unit) {}
|
||||
|
||||
fun test() {
|
||||
foo {
|
||||
a()
|
||||
bar {
|
||||
<!DSL_SCOPE_VIOLATION!>a<!>()
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user