Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@kuuote
Copy link
Contributor

@kuuote kuuote commented Jul 20, 2019

Problem

An error occurs when run a script containing unevaluated dictionary access with scriptversion 2.

Reproduce step

sample.vim

scriptversion 2

let x = {'foo': 0}

if 0 && x.foo
  echo 'foo'
endif
$ vim -u NONE -i NONE -N -S sample.vim

Cause

Unevaluted dot operator is always treated as a string concat.

How to fix

Skip string concat checking when unevaluating.

@codecov-io
Copy link

Codecov Report

Merging #4704 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4704      +/-   ##
==========================================
+ Coverage   81.35%   81.36%   +0.01%     
==========================================
  Files         114      114              
  Lines      145212   145212              
==========================================
+ Hits       118143   118158      +15     
+ Misses      27069    27054      -15
Impacted Files Coverage Δ
src/eval.c 86.32% <100%> (ø) ⬆️
src/if_xcmdsrv.c 85.63% <0%> (-0.54%) ⬇️
src/window.c 87.39% <0%> (+0.09%) ⬆️
src/gui_gtk_x11.c 58.01% <0%> (+0.14%) ⬆️
src/os_unix.c 63.53% <0%> (+0.17%) ⬆️
src/ex_cmds.c 82.33% <0%> (+0.24%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ab0a789...1418180. Read the comment docs.

@brammool brammool closed this in 61343f0 Jul 20, 2019
manuelschiller pushed a commit to manuelschiller/vim that referenced this pull request Nov 10, 2019
…ccess

Problem:    Error when scriptversion is 2 a making a dictionary access.
Solution:   Parse the subscript even when not evaluating the sub-expression.
            (closes vim#4704)
seandewar added a commit to seandewar/neovim that referenced this pull request May 21, 2021
…ry access

Problem:    Error when scriptversion is 2 a making a dictionary access.
Solution:   Parse the subscript even when not evaluating the sub-expression.
            (closes vim/vim#4704)
vim/vim@61343f0
seandewar added a commit to seandewar/neovim that referenced this pull request May 21, 2021
…ry access

Problem:    Error when scriptversion is 2 a making a dictionary access.
Solution:   Parse the subscript even when not evaluating the sub-expression.
            (closes vim/vim#4704)
vim/vim@61343f0
seandewar added a commit to seandewar/neovim that referenced this pull request May 21, 2021
…ry access

Problem:    Error when scriptversion is 2 a making a dictionary access.
Solution:   Parse the subscript even when not evaluating the sub-expression.
            (closes vim/vim#4704)
vim/vim@61343f0
seandewar added a commit to seandewar/neovim that referenced this pull request May 22, 2021
…ry access

Problem:    Error when scriptversion is 2 a making a dictionary access.
Solution:   Parse the subscript even when not evaluating the sub-expression.
            (closes vim/vim#4704)
vim/vim@61343f0
seandewar added a commit to seandewar/neovim that referenced this pull request Jun 2, 2021
…ry access

Problem:    Error when scriptversion is 2 a making a dictionary access.
Solution:   Parse the subscript even when not evaluating the sub-expression.
            (closes vim/vim#4704)
vim/vim@61343f0
seandewar added a commit to seandewar/neovim that referenced this pull request Jun 2, 2021
…ry access

Problem:    Error when scriptversion is 2 a making a dictionary access.
Solution:   Parse the subscript even when not evaluating the sub-expression.
            (closes vim/vim#4704)
vim/vim@61343f0
seandewar added a commit to seandewar/neovim that referenced this pull request Jun 2, 2021
…ry access

Problem:    Error when scriptversion is 2 a making a dictionary access.
Solution:   Parse the subscript even when not evaluating the sub-expression.
            (closes vim/vim#4704)
vim/vim@61343f0
seandewar added a commit to seandewar/neovim that referenced this pull request Jun 3, 2021
…ry access

Problem:    Error when scriptversion is 2 a making a dictionary access.
Solution:   Parse the subscript even when not evaluating the sub-expression.
            (closes vim/vim#4704)
vim/vim@61343f0
seandewar added a commit to seandewar/neovim that referenced this pull request Jun 5, 2021
…ry access

Problem:    Error when scriptversion is 2 a making a dictionary access.
Solution:   Parse the subscript even when not evaluating the sub-expression.
            (closes vim/vim#4704)
vim/vim@61343f0
seandewar added a commit to seandewar/neovim that referenced this pull request Jun 25, 2021
…ry access

Problem:    Error when scriptversion is 2 a making a dictionary access.
Solution:   Parse the subscript even when not evaluating the sub-expression.
            (closes vim/vim#4704)
vim/vim@61343f0
seandewar added a commit to seandewar/neovim that referenced this pull request Jun 26, 2021
…ry access

Problem:    Error when scriptversion is 2 a making a dictionary access.
Solution:   Parse the subscript even when not evaluating the sub-expression.
            (closes vim/vim#4704)
vim/vim@61343f0
seandewar added a commit to seandewar/neovim that referenced this pull request Aug 26, 2021
…ry access

Problem:    Error when scriptversion is 2 a making a dictionary access.
Solution:   Parse the subscript even when not evaluating the sub-expression.
            (closes vim/vim#4704)
vim/vim@61343f0
seandewar added a commit to seandewar/neovim that referenced this pull request Aug 26, 2021
…ry access

Problem:    Error when scriptversion is 2 a making a dictionary access.
Solution:   Parse the subscript even when not evaluating the sub-expression.
            (closes vim/vim#4704)
vim/vim@61343f0
seandewar added a commit to seandewar/neovim that referenced this pull request Sep 10, 2021
…ry access

Problem:    Error when scriptversion is 2 a making a dictionary access.
Solution:   Parse the subscript even when not evaluating the sub-expression.
            (closes vim/vim#4704)
vim/vim@61343f0

:scriptversion is N/A.
seandewar added a commit to seandewar/neovim that referenced this pull request Sep 10, 2021
…ry access

Problem:    Error when scriptversion is 2 a making a dictionary access.
Solution:   Parse the subscript even when not evaluating the sub-expression.
            (closes vim/vim#4704)
vim/vim@61343f0

:scriptversion is N/A.
seandewar added a commit to seandewar/neovim that referenced this pull request Sep 11, 2021
…ry access

Problem:    Error when scriptversion is 2 a making a dictionary access.
Solution:   Parse the subscript even when not evaluating the sub-expression.
            (closes vim/vim#4704)
vim/vim@61343f0

:scriptversion is N/A.
lewis6991 pushed a commit to lewis6991/neovim that referenced this pull request Dec 12, 2021
…ry access

Problem:    Error when scriptversion is 2 a making a dictionary access.
Solution:   Parse the subscript even when not evaluating the sub-expression.
            (closes vim/vim#4704)
vim/vim@61343f0

:scriptversion is N/A.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants