Show only unique diagnostics in psi checker (KT-35578)

MissingDependencyClassChecker.collectDiagnostics now show only unique diagnostics

As per-file analyzer trace used in checker delegates to resolve session trace, diagnostics might be duplicated because of race condition:
 1. If a non-checker thread performs analyze first, diagnostics for global elements will be stored in the resolve session trace only once.
 2 If the checker threads comes to the analyze first, diagnostics will be stored in the local trace, and after that might be duplicated in the resolve session trace by other analyzers.

 #KT-35578 Fixed
This commit is contained in:
Nikolay Krasko
2019-12-02 01:01:10 +03:00
committed by Nikolay Krasko
parent 75beaa861f
commit e99dc0f87f
11 changed files with 96 additions and 30 deletions
@@ -1,7 +1,6 @@
// OUT_OF_CODE_BLOCK: FALSE
// ERROR: This variable must either have a type annotation or be initialized
// ERROR: Type mismatch: inferred type is Unit but Int? was expected
// ERROR: Type mismatch: inferred type is Unit but Int? was expected
val test: Int? = if (true) {
fun test() {