[FIR] Add exhaustive checker for when expressions

Also remove generating default else branch introduced in 38fa0122 and 54eb4cf9
This commit is contained in:
Dmitriy Novozhilov
2019-10-15 12:52:02 +03:00
parent 25e853606e
commit f19a878948
93 changed files with 5003 additions and 5464 deletions
@@ -425,6 +425,7 @@ object ImplementationConfigurator : AbstractFirTreeImplementationConfigurator()
impl(whenExpression) {
default("calleeReference", "FirStubReference()")
defaultFalse("isExhaustive")
useTypes(stubReferenceType)
}
@@ -500,6 +500,7 @@ object NodeConfigurator : AbstractFieldConfigurator() {
+field("subject", expression, nullable = true).withTransform()
+field("subjectVariable", variable.withArgs("F" to "*"), nullable = true)
+fieldList("branches", whenBranch).withTransform()
+booleanField("isExhaustive", withReplace = true)
needTransformOtherChildren()
}