diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-09-26 14:10:49 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2017-09-26 14:10:49 -0300 |
commit | 13256a4173af4004518d65211b4bf1aebcd5fc25 (patch) | |
tree | 226160a5e42a38b2f5888dc62f9472042bc7edf3 /lcode.c | |
parent | abb17cf19bf7328a394f1758542172c4b4dbb539 (diff) | |
download | lua-github-13256a4173af4004518d65211b4bf1aebcd5fc25.tar.gz |
detail
put explicit all cases for a switch of an enumeration
Diffstat (limited to 'lcode.c')
-rw-r--r-- | lcode.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1,5 +1,5 @@ /* -** $Id: lcode.c,v 2.122 2017/09/13 19:50:08 roberto Exp roberto $ +** $Id: lcode.c,v 2.123 2017/09/19 18:38:14 roberto Exp roberto $ ** Code generator for Lua ** See Copyright Notice in lua.h */ @@ -1263,10 +1263,12 @@ void luaK_infix (FuncState *fs, BinOpr op, expdesc *v) { /* else keep numeral, which may be folded with 2nd operand */ break; } - default: { + case OPR_EQ: case OPR_LT: case OPR_LE: + case OPR_NE: case OPR_GT: case OPR_GE: { luaK_exp2RK(fs, v); break; } + default: lua_assert(0); } } |