0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 9.0.1108: type error when using "any" type and adding to float

Problem:    Type error when using "any" type and adding a number to a float.
Solution:   Accept both a number and a float. (closes #11753)
This commit is contained in:
Bram Moolenaar
2022-12-29 20:56:24 +00:00
parent 73ade49c4b
commit c6951a76a5
12 changed files with 117 additions and 54 deletions

View File

@@ -1460,6 +1460,12 @@ typedef struct {
type_T *type_decl; // declared type or equal to type_current
} type2_T;
#define TTFLAG_VARARGS 0x01 // func args ends with "..."
#define TTFLAG_BOOL_OK 0x02 // can be converted to bool
#define TTFLAG_NUMBER_OK 0x04 // tt_type is VAR_FLOAT, VAR_NUMBER is OK
#define TTFLAG_STATIC 0x08 // one of the static types, e.g. t_any
#define TTFLAG_CONST 0x10 // cannot be changed
typedef enum {
ACCESS_PRIVATE, // read/write only inside th class
ACCESS_READ, // read everywhere, write only inside th class
@@ -1517,11 +1523,6 @@ struct object_S
int obj_copyID; // used by garbage collection
};
#define TTFLAG_VARARGS 0x01 // func args ends with "..."
#define TTFLAG_BOOL_OK 0x02 // can be converted to bool
#define TTFLAG_STATIC 0x04 // one of the static types, e.g. t_any
#define TTFLAG_CONST 0x08 // cannot be changed
/*
* Structure to hold an internal variable without a name.
*/