Consider the following code:
" test-filereadable.vim:
set nocompatible
let s:g={"load":{"saveoptions":{"abc":function("string")}}}
function TestFileReadable()
let file="/non-existent-file"
let tail="abc"
if filereadable(file)
call s:g.load.saveoptions[tail](readfile(file, 'b'))
endif
endfunction
try
call TestFileReadable()
catch
call writefile([v:exception], "bad")
endtry
qa!
For fea3207b800d (vim-7.3.96) and earlier revisions this code does not throw
any
errors (because it contains none). For faf4b09c396e (vim-7.3.97) and later
revisions we get the following contents in the «bad» file:
Vim(call):E15: Invalid expression:
s:g.load.saveoptions[tail](readfile(file,
'b'))
(one line, of course). Expression s:g.load.saveoptions[tail](...) is actually
used for existing files in one of my plugins and thus is valid.
Attaching files that were used to find revision where it was introduced with
`hg
bisect'. If you want to repeat bisecting, you will need to adjust paths in
`test-bad.zsh'.
test-filereadable.vim
Description: application/wine-extension-vim
test-bad.zsh
Description: application/shellscript
signature.asc
Description: This is a digitally signed message part.
