Skip to content

"Undefined variable" with slicing #179

@blueyed

Description

@blueyed

With a file like the following:

function! F()
  let s = '123'
  let foobar = 1
  echo s[foobar:foobar+1]
endfunction

vint will wrongly say:

t.vim:4:10: Undefined variable: foobar:foobar (see :help E738)

The workaround is to use s[(foobar):(foobar+1)], but both works in Vim.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions