patch 9.0.1334: using tt_member for the class leads to mistakes
Problem: Using tt_member for the class leads to mistakes.
Solution: Add a separate tt_class field.
diff --git a/src/evalfunc.c b/src/evalfunc.c
index cf30ed7..1dc723f 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -585,7 +585,7 @@
{
type_T *expected_member = NULL;
type_T *(args[2]);
- type_T t_func_exp = {VAR_FUNC, 2, 0, 0, NULL, args};
+ type_T t_func_exp = {VAR_FUNC, 2, 0, 0, NULL, NULL, args};
if (context->arg_types[0].type_curr->tt_type == VAR_LIST
|| context->arg_types[0].type_curr->tt_type == VAR_DICT)
@@ -699,7 +699,7 @@
if (type->tt_type == VAR_FUNC)
{
type_T *(args[2]);
- type_T t_func_exp = {VAR_FUNC, 2, 0, 0, &t_number, args};
+ type_T t_func_exp = {VAR_FUNC, 2, 0, 0, &t_number, NULL, args};
if (context->arg_types[0].type_curr->tt_type == VAR_LIST)
args[0] = context->arg_types[0].type_curr->tt_member;