public static boolean checkIntroduceWhenSubject(@NotNull JetWhenExpression whenExpression) {
return getWhenSubjectCandidate(whenExpression) != null;
}
public static boolean checkEliminateWhenSubject(@NotNull JetWhenExpression whenExpression) {
return whenExpression.getSubjectExpression() instanceof JetSimpleNameExpression;
<BUG>}
public static void flattenWhen(@NotNull JetWhenExpression whenExpression) {
</BUG>
JetExpression subjectExpression = whenExpression.getSubjectExpression();
JetExpression elseBranch = whenExpression.getElseExpression();

public static boolean checkIntroduceWhenSubject(@NotNull JetWhenExpression whenExpression) {
return getWhenSubjectCandidate(whenExpression) != null;
}
public static boolean checkEliminateWhenSubject(@NotNull JetWhenExpression whenExpression) {
return whenExpression.getSubjectExpression() instanceof JetSimpleNameExpression;
}
@NotNull
public static JetWhenExpression flattenWhen(@NotNull JetWhenExpression whenExpression) {
JetExpression subjectExpression = whenExpression.getSubjectExpression();
JetExpression elseBranch = whenExpression.getElseExpression();
