docs: private ClassNode checkForTargetType(final Expression expr, final ClassNode type) {
          BinaryExpression enclosingBinaryExpression = typeCheckingContext.getEnclosingBinaryExpression();
          if (enclosingBinaryExpression instanceof DeclarationExpression
                  && isEmptyCollection(expr) && isAssignment(enclosingBinaryExpression.getOperation().getType())) {
              VariableExpression target = (VariableExpression) enclosingBinaryExpression.getLeftExpression();
              return adjustForTargetType(target.getType(), type);
          }
          if (currentField != null) {
              return adjustForTargetType(currentField.getType(), type);
          }
          if (currentProperty != null) {
              return adjustForTargetType(currentProperty.getType(), type);
          }
          MethodNode enclosingMethod = typeCheckingContext.getEnclosingMethod();
          if (enclosingMethod != null) {
              return adjustForTargetType(enclosingMethod.getReturnType(), type);
          }
          return type;
      }