ConversionResult (@NotNull PsiType targetType, @NotNull PsiType actualType, @NotNull Position position, @NotNull GroovyPsiElement context) { if (!PsiTypes.booleanType().equals(TypesUtil.unboxPrimitiveTypeWrapper(targetType))) return null; return switch (position) { case ASSIGNMENT, RETURN_VALUE -> ConversionResult.OK; default -> null; }; }