boolean (@Nullable PsiCaseLabelElement who, @NotNull PsiCaseLabelElement overWhom) { if (who == null) return false; PsiType overWhomType = getPatternType(overWhom); if (overWhomType == null || !isUnconditionalForType(who, overWhomType, true)) { return false; } PsiDeconstructionPattern whoDeconstruction = findDeconstructionPattern(who); if (whoDeconstruction != null) { PsiDeconstructionPattern overWhomDeconstruction = findDeconstructionPattern(overWhom); return dominatesComponents(whoDeconstruction, overWhomDeconstruction); } return true; }