diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2023-10-04 19:47:52 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2023-10-04 19:47:52 +0200 |
commit | fe7b20a1a39dc645a6ea7ae925512f9227fd1695 (patch) | |
tree | d7bdcc5c9d3617324dbbab0dd13ae44e64ebc0fd /src/structs.h | |
parent | b9a974df9e22c7b56d8faac3246fb5f80a9351d4 (diff) |
patch 9.0.1977: Vim9: object members can change typev9.0.1977
Problem: Vim9: object members can change type
Solution: Check type during assignment to object/class var
closes: #13127
closes: #13262
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Diffstat (limited to 'src/structs.h')
-rw-r--r-- | src/structs.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/structs.h b/src/structs.h index 8443a4211d..c7360a30cc 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1509,10 +1509,11 @@ typedef enum { * Entry for an object or class member variable. */ typedef struct { - char_u *ocm_name; // allocated + char_u *ocm_name; // allocated omacc_T ocm_access; + int ocm_has_type; // type specified explicitly type_T *ocm_type; - char_u *ocm_init; // allocated + char_u *ocm_init; // allocated } ocmember_T; // used for the lookup table of a class member index and object method index |