comparison src/vim9compile.c @ 31754:48431422f766 v9.0.1209

patch 9.0.1209: getting interface member does not always work Commit: https://github.com/vim/vim/commit/29ac5df37baf7e6e751c7ebd4ab37a2aa826e9e6 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jan 16 19:43:47 2023 +0000 patch 9.0.1209: getting interface member does not always work Problem: Getting interface member does not always work. Solution: Convert the index on the interface to the index on the object. (closes #11825)
author Bram Moolenaar <Bram@vim.org>
date Mon, 16 Jan 2023 20:45:04 +0100
parents ad0712119bee
children 85f93e094810
comparison
equal deleted inserted replaced
31753:048ae7b3fdd6 31754:48431422f766
2054 if (lhs->lhs_member_idx < 0) 2054 if (lhs->lhs_member_idx < 0)
2055 return FAIL; 2055 return FAIL;
2056 2056
2057 if (generate_LOAD(cctx, ISN_LOAD, 0, NULL, lhs->lhs_type) == FAIL) 2057 if (generate_LOAD(cctx, ISN_LOAD, 0, NULL, lhs->lhs_type) == FAIL)
2058 return FAIL; 2058 return FAIL;
2059 if (cl->class_flags & CLASS_INTERFACE)
2060 return generate_GET_ITF_MEMBER(cctx, cl, lhs->lhs_member_idx, type);
2059 return generate_GET_OBJ_MEMBER(cctx, lhs->lhs_member_idx, type); 2061 return generate_GET_OBJ_MEMBER(cctx, lhs->lhs_member_idx, type);
2060 } 2062 }
2061 2063
2062 compile_load_lhs(lhs, var_start, NULL, cctx); 2064 compile_load_lhs(lhs, var_start, NULL, cctx);
2063 2065