[NI] Don't approximate error types
Previously, we did approximation of error types to Any?/Nothing in some contexts (e.g. non-local declarations). There are several reasons why it is not desired: - OI doesn't approximate ErrorType - This behaviour is inconsistent with ourselves (i.e. sometimes we *do* infer errortype for top-level declaration) - It causes different digressions from OI in reported diagnostics This commit turns off error type approximation. It causes large testdata shift, which is deliberately split into several parts and commited in a separate commits.
This commit is contained in:
@@ -67,6 +67,7 @@ open class TypeApproximatorConfiguration {
|
||||
|
||||
abstract class AbstractCapturedTypesApproximation(val approximatedCapturedStatus: CaptureStatus): TypeApproximatorConfiguration.AllFlexibleSameValue() {
|
||||
override val allFlexible get() = true
|
||||
override val errorType get() = true
|
||||
|
||||
// i.e. will be approximated only approximatedCapturedStatus captured types
|
||||
override val capturedType get() = { it: NewCapturedType -> it.captureStatus != approximatedCapturedStatus }
|
||||
|
||||
Reference in New Issue
Block a user