[FIR-TEST] Count all ConeKotlinErrorType as error types

This commit is contained in:
Dmitriy Novozhilov
2020-06-15 10:22:34 +03:00
parent d7ee168dff
commit 1186d1affd
@@ -313,19 +313,15 @@ class FirResolveBench(val withProgress: Boolean) {
resolvedTypes++ resolvedTypes++
val type = resolvedTypeRef.type val type = resolvedTypeRef.type
if (type is ConeKotlinErrorType || type is ConeClassErrorType) { if (type is ConeKotlinErrorType || type is ConeClassErrorType) {
if (resolvedTypeRef.psi == null) {
implicitTypes++
} else {
errorTypes++ errorTypes++
if (resolvedTypeRef is FirErrorTypeRef && resolvedTypeRef.diagnostic is ConeStubDiagnostic) { if (resolvedTypeRef is FirErrorTypeRef && resolvedTypeRef.diagnostic is ConeStubDiagnostic) {
return return
} }
val psi = resolvedTypeRef.psi!! val psi = resolvedTypeRef.psi ?: return
val problem = "${resolvedTypeRef::class.simpleName} -> ${type::class.simpleName}: ${type.render()}" val problem = "${resolvedTypeRef::class.simpleName} -> ${type::class.simpleName}: ${type.render()}"
reportProblem(problem, psi) reportProblem(problem, psi)
} }
} }
}
}) })
} }
} }