[FE 1.0] Report recursive type checker problem as a warning till 1.9

^KT-48546
This commit is contained in:
Victor Petukhov
2022-03-18 09:54:53 +04:00
committed by teamcity
parent 2307122089
commit 57a134c543
20 changed files with 118 additions and 17 deletions
@@ -273,7 +273,7 @@ class KotlinCallCompleter(
constraintSystem.errors.forEach(diagnosticsHolder::addError)
if (returnType is ErrorType && returnType.kind == ErrorTypeKind.RECURSIVE_TYPE) {
diagnosticsHolder.addDiagnostic(TypeCheckerHasRanIntoRecursion(resolvedCallAtom))
diagnosticsHolder.addDiagnostic(TypeCheckerHasRanIntoRecursion)
}
}
@@ -116,7 +116,7 @@ class WrongCountOfTypeArguments(
override fun report(reporter: DiagnosticReporter) = reporter.onTypeArguments(this)
}
class TypeCheckerHasRanIntoRecursion : KotlinCallDiagnostic(INAPPLICABLE) {
object TypeCheckerHasRanIntoRecursion : KotlinCallDiagnostic(INAPPLICABLE) {
override fun report(reporter: DiagnosticReporter) = reporter.onCall(this)
}