Loading ...
Sorry, an error occurred while loading the content.

Re: BUG: echo_string incorrectly detects a structure as recursive

Expand Messages
  • Bram Moolenaar
    ... repeat() creates multiple references to the same Dict or List. :echo doesn t list the same Dict or List twice. This works as intended. -- It might look
    Message 1 of 2 , Jul 28, 2010
    • 0 Attachment
      Matt Wozniski wrote:

      > To reproduce:
      >
      > :echo repeat([{'a':'1'}], 2)
      > [{'a': '1'}, {...}]
      >
      > expected output: [{'a': '1'}, {'a': '1'}]
      >
      > :echo repeat([[0]], 2)
      > [[0], [...]]
      >
      > expected output: [[0], [0]]
      >
      > This seems to be caused by echo_string deciding that the data
      > structure is recursive, despite the fact that it definitely shouldn't
      > be.

      repeat() creates multiple references to the same Dict or List. :echo
      doesn't list the same Dict or List twice. This works as intended.

      --
      It might look like I'm doing nothing, but at the cellular level
      I'm really quite busy.

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ download, build and distribute -- http://www.A-A-P.org ///
      \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

      --
      You received this message from the "vim_dev" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    Your message has been successfully submitted and would be delivered to recipients shortly.