Vimjas / vint

Fast and Highly Extensible Vim script Language Lint implemented in Python.
MIT License
702 stars 33 forks source link

Error when calling map() as a method - ProhibitInvalidMapCall - Number of arguments for map() #380

Open systemmonkey42 opened 2 years ago

systemmonkey42 commented 2 years ago

Using the latest release (vim-vint-0.1.dev1+g471e70b) I get the following

  function! Mask2int(mask,drawer) abort
✗     return printf("%010b", '0x'.a:mask)->slice(0,10)->split('\zs')->reverse()->map('v:val ? a:drawer."/".(v:key+1) : ""')->filter('v:val')
  endfunction

ProhibitInvalidMapCall - Number of arguments for map() must be 2 (if not, it will throw E118 or E119) (see :help map())

It appears it accepts most method calls, but fails on map() which it thinks requires additional arguments despite being a method call.

Thanks