[FIR] Don't ignore too many diagnostics
`DelegatingConstructorCall` - because in this case there is either `UNRESOLVED_REFERENCE` or `SYNTAX` already. `ErrorTypeRef` - because in this case there is `SYNTAX` already. Note that there is only 1 test that shows this behavior, and it's LT-specific. It's `FirLightTreeOldFrontendDiagnosticsTestGenerated.testKt847`, and in this test the string template is parsed and processed differently in LT and PSI: - in LT there are 6 nodes: "", "$this", " must be", "$as", "$t", "". - in PSI there 4 notes: "$this", " must be", "$as", "$t".
This commit is contained in:
committed by
Space Team
parent
7a31167e0b
commit
a871fa9a64
+2
-2
@@ -156,8 +156,8 @@ private fun ConeDiagnostic.toKtDiagnostic(
|
||||
}
|
||||
|
||||
private val KtFakeSourceElementKind.canBeIgnored: Boolean
|
||||
get() = this != KtFakeSourceElementKind.ReferenceInAtomicQualifiedAccess
|
||||
&& this != KtFakeSourceElementKind.ImplicitReturnTypeOfLambdaValueParameter
|
||||
get() = this == KtFakeSourceElementKind.DelegatingConstructorCall
|
||||
|| this == KtFakeSourceElementKind.ErrorTypeRef
|
||||
|
||||
fun FirBasedSymbol<*>.toInvisibleReferenceDiagnostic(source: KtSourceElement?): KtDiagnostic? = when (val symbol = this) {
|
||||
is FirCallableSymbol<*> -> FirErrors.INVISIBLE_REFERENCE.createOn(source, symbol, symbol.visibility, symbol.callableId.classId)
|
||||
|
||||
Reference in New Issue
Block a user