Mercurial > vim
comparison src/structs.h @ 33446:508dfc0c261c v9.0.1977
patch 9.0.1977: Vim9: object members can change type
Commit: https://github.com/vim/vim/commit/fe7b20a1a39dc645a6ea7ae925512f9227fd1695
Author: Yegappan Lakshmanan <yegappan@yahoo.com>
Date: Wed Oct 4 19:47:52 2023 +0200
patch 9.0.1977: Vim9: object members can change type
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>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Wed, 04 Oct 2023 20:00:06 +0200 |
parents | 18f4a04384f3 |
children | 4a62e78803db |
comparison
equal
deleted
inserted
replaced
33445:816fd36de6e0 | 33446:508dfc0c261c |
---|---|
1507 | 1507 |
1508 /* | 1508 /* |
1509 * Entry for an object or class member variable. | 1509 * Entry for an object or class member variable. |
1510 */ | 1510 */ |
1511 typedef struct { | 1511 typedef struct { |
1512 char_u *ocm_name; // allocated | 1512 char_u *ocm_name; // allocated |
1513 omacc_T ocm_access; | 1513 omacc_T ocm_access; |
1514 int ocm_has_type; // type specified explicitly | |
1514 type_T *ocm_type; | 1515 type_T *ocm_type; |
1515 char_u *ocm_init; // allocated | 1516 char_u *ocm_init; // allocated |
1516 } ocmember_T; | 1517 } ocmember_T; |
1517 | 1518 |
1518 // used for the lookup table of a class member index and object method index | 1519 // used for the lookup table of a class member index and object method index |
1519 typedef struct itf2class_S itf2class_T; | 1520 typedef struct itf2class_S itf2class_T; |
1520 struct itf2class_S { | 1521 struct itf2class_S { |