| 5788 | |
| 5789 | |
| 5790 | static void funcstat (LexState *ls, int line, const bool global) { |
| 5791 | /* funcstat -> FUNCTION funcname body */ |
| 5792 | int ismethod; |
| 5793 | expdesc v, b; |
| 5794 | ismethod = funcname(ls, &v); |
| 5795 | if (!global) |
| 5796 | check_assignment(ls, &v); |
| 5797 | check_readonly(ls, &v); |
| 5798 | TypeDesc td; |
| 5799 | body(ls, &b, ismethod, line, &td); |
| 5800 | if (v.k == VINDEXUP) { |
| 5801 | TValue *key = &ls->fs->f->k[v.u.ind.idx]; |
| 5802 | TypeHint& th = get_global_prop(ls, tsvalue(key)); |
| 5803 | th.clear(); |
| 5804 | th.emplaceTypeDesc(std::move(td)); |
| 5805 | } |
| 5806 | luaK_storevar(ls->fs, &v, &b); |
| 5807 | luaK_fixline(ls->fs, line); /* definition "happens" in the first line */ |
| 5808 | } |
| 5809 | |
| 5810 | |
| 5811 | static void exprstat (LexState *ls) { |
no test coverage detected