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.
diff --git a/src/vim9compile.c b/src/vim9compile.c
index 4b294df..416198a 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -3490,7 +3490,7 @@
type_T **typep;
// list index: list[123]
- // list member: dict[key]
+ // dict member: dict[key]
// TODO: blob index
// TODO: more arguments
// TODO: recognize list or dict at runtime
@@ -4999,8 +4999,8 @@
goto theend;
}
}
- else if (*p != '=' && check_type(member_type, stacktype, TRUE)
- == FAIL)
+ else if (*p != '=' && need_type(stacktype, member_type, -1,
+ cctx) == FAIL)
goto theend;
}
}