Skip to content

Commit

Permalink
Add saner handling for when Pluto_operator_extends magically disappears
Browse files Browse the repository at this point in the history
  • Loading branch information
Sainan committed Jul 19, 2023
1 parent 375c30a commit d2aa810
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lparser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1521,7 +1521,11 @@ static void applyextends (LexState *ls, expdesc *v, TString *parent, int line) {

expdesc f;
singlevaraux(fs, luaS_newliteral(ls->L, "Pluto_operator_extends"), &f, 1);
lua_assert(f.k != VVOID);
// lua_assert(f.k != VVOID);
if (f.k == VVOID) {
luaX_prev(ls);
luaX_syntaxerror(ls, "It seems 'Pluto_operator_extends' has disappeared. If you know how to reproduce this, please get in touch at <https://github.com/PlutoLang/Pluto/issues>.");
}
luaK_exp2nextreg(fs, &f);

expdesc args = *v;
Expand Down

0 comments on commit d2aa810

Please sign in to comment.