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:
committed by
Nikolay Krasko
parent
75beaa861f
commit
e99dc0f87f
@@ -23,7 +23,7 @@ fun case_1(x: Nothing?) {
|
||||
fun case_2(x: Nothing) {
|
||||
if (<!USELESS_IS_CHECK!>x <!UNREACHABLE_CODE!>is Unit<!><!>) <!UNREACHABLE_CODE!>{
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing")!>x<!>
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing")!>x<!>.<!MISSING_DEPENDENCY_CLASS, MISSING_DEPENDENCY_CLASS!>inv<!>()
|
||||
<!DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing")!>x<!>.<!MISSING_DEPENDENCY_CLASS!>inv<!>()
|
||||
}<!>
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ fun case_7(x: Nothing) {
|
||||
fun case_8(x: Nothing?) {
|
||||
if (!(<!USELESS_IS_CHECK!><!DEBUG_INFO_CONSTANT!>x<!> is Int?<!>)) else {
|
||||
<!DEBUG_INFO_CONSTANT, DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing?")!>x<!>
|
||||
<!DEBUG_INFO_CONSTANT, DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing?")!>x<!>?.<!MISSING_DEPENDENCY_CLASS, MISSING_DEPENDENCY_CLASS!>inv<!>()
|
||||
<!DEBUG_INFO_CONSTANT, DEBUG_INFO_EXPRESSION_TYPE("kotlin.Nothing?")!>x<!>?.<!MISSING_DEPENDENCY_CLASS!>inv<!>()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user