mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -04:00
patch 9.0.2156: Vim9: can use typealias in assignment
Problem: Vim9: can use typealias in an assignment Solution: Generate errors when class/typealias involved in the rhs of an assignment closes: #13637 Signed-off-by: Ernie Rael <errael@raelity.com> Signed-off-by: Christian Brabandt <cb@256bit.org> Generate errors when class/typealias involved in assignment.
This commit is contained in:
committed by
Christian Brabandt
parent
fa920da283
commit
9ed53752df
@@ -2797,6 +2797,8 @@ compile_assignment(
|
||||
|
||||
rhs_type = cctx->ctx_type_stack.ga_len == 0 ? &t_void
|
||||
: get_type_on_stack(cctx, 0);
|
||||
if (check_type_is_value(rhs_type) == FAIL)
|
||||
goto theend;
|
||||
if (lhs.lhs_lvar != NULL && (is_decl || !lhs.lhs_has_type))
|
||||
{
|
||||
if ((rhs_type->tt_type == VAR_FUNC
|
||||
|
Reference in New Issue
Block a user