c9cb2062bd
- In KT-62899, diagnostics produced by file checkers weren't suppressed because the top-level declarations on which the diagnostics are reported were never visited by the same reporter. `LLFirDiagnosticVisitor` skips nested declarations by design, as diagnostics are collected for each structure element separately. However, suppression takes effect when diagnostics are committed on some element. If the element is not visited, suppression is skipped and the diagnostic is committed at the end without a check by `FileStructureElementDiagnosticsCollector.collectForStructureElement`. - The fix ensures that diagnostics are committed on top-level declarations, similar to how this was already done for class members. ^KT-62899 fixed
11 lines
158 B
Kotlin
Vendored
11 lines
158 B
Kotlin
Vendored
class SomeClass
|
|
|
|
@Suppress("CONFLICTING_OVERLOADS")
|
|
fun someFun(): SomeClass {
|
|
return SomeClass()
|
|
}
|
|
|
|
@Suppress("CONFLICTING_OVERLOADS")
|
|
fun someFun() {
|
|
}
|