Mercurial > vim
comparison src/vim9compile.c @ 20419:d54dfb5f12db v8.2.0764
patch 8.2.0764: Vim9: assigning to option not fully tested
Commit: https://github.com/vim/vim/commit/a6e67e4f41386c3e6eab7e047671c6d32f6cb0dc
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri May 15 23:36:40 2020 +0200
patch 8.2.0764: Vim9: assigning to option not fully tested
Problem: Vim9: assigning to option not fully tested.
Solution: Add more test cases. Allow using any type for assignment.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 15 May 2020 23:45:04 +0200 |
parents | c225be44692a |
children | 489cb75c76b6 |
comparison
equal
deleted
inserted
replaced
20418:2005771741d3 | 20419:d54dfb5f12db |
---|---|
3488 { | 3488 { |
3489 garray_T *stack = &cctx->ctx_type_stack; | 3489 garray_T *stack = &cctx->ctx_type_stack; |
3490 type_T **typep; | 3490 type_T **typep; |
3491 | 3491 |
3492 // list index: list[123] | 3492 // list index: list[123] |
3493 // list member: dict[key] | 3493 // dict member: dict[key] |
3494 // TODO: blob index | 3494 // TODO: blob index |
3495 // TODO: more arguments | 3495 // TODO: more arguments |
3496 // TODO: recognize list or dict at runtime | 3496 // TODO: recognize list or dict at runtime |
3497 if (generate_ppconst(cctx, ppconst) == FAIL) | 3497 if (generate_ppconst(cctx, ppconst) == FAIL) |
3498 return FAIL; | 3498 return FAIL; |
4997 } | 4997 } |
4998 if (need_type(stacktype, use_type, -1, cctx) == FAIL) | 4998 if (need_type(stacktype, use_type, -1, cctx) == FAIL) |
4999 goto theend; | 4999 goto theend; |
5000 } | 5000 } |
5001 } | 5001 } |
5002 else if (*p != '=' && check_type(member_type, stacktype, TRUE) | 5002 else if (*p != '=' && need_type(stacktype, member_type, -1, |
5003 == FAIL) | 5003 cctx) == FAIL) |
5004 goto theend; | 5004 goto theend; |
5005 } | 5005 } |
5006 } | 5006 } |
5007 else if (cmdidx == CMD_const) | 5007 else if (cmdidx == CMD_const) |
5008 { | 5008 { |