PsiPrimaryPattern (@Nullable PsiCaseLabelElement pattern) { if (pattern == null || isGuarded(pattern)) return null; if (pattern instanceof PsiParenthesizedPattern) { return findUnconditionalPattern(((PsiParenthesizedPattern)pattern).getPattern()); } else if (pattern instanceof PsiDeconstructionPattern || pattern instanceof PsiTypeTestPattern || pattern instanceof PsiUnnamedPattern) { return (PsiPrimaryPattern)pattern; } return null; }