forked from aniani/vim
patch 8.2.2300: Vim9: wrong order on type stack when using dict
Problem: Vim9: wrong order on type stack when using dict. Solution: Generate constants before a dict. (closes #7619)
This commit is contained in:
parent
d1510ee946
commit
d62d87d8f3
@ -1094,6 +1094,8 @@ def Test_expr5()
|
|||||||
|
|
||||||
$ENVVAR = 'env'
|
$ENVVAR = 'env'
|
||||||
assert_equal('aenv', 'a' .. $ENVVAR)
|
assert_equal('aenv', 'a' .. $ENVVAR)
|
||||||
|
|
||||||
|
assert_equal('val', '' .. {key: 'val'}['key'])
|
||||||
END
|
END
|
||||||
CheckDefAndScriptSuccess(lines)
|
CheckDefAndScriptSuccess(lines)
|
||||||
enddef
|
enddef
|
||||||
|
@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2300,
|
||||||
/**/
|
/**/
|
||||||
2299,
|
2299,
|
||||||
/**/
|
/**/
|
||||||
|
@ -3027,6 +3027,8 @@ compile_dict(char_u **arg, cctx_T *cctx, ppconst_T *ppconst)
|
|||||||
|
|
||||||
if (d == NULL)
|
if (d == NULL)
|
||||||
return FAIL;
|
return FAIL;
|
||||||
|
if (generate_ppconst(cctx, ppconst) == FAIL)
|
||||||
|
return FAIL;
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
char_u *key = NULL;
|
char_u *key = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user