diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2021-06-20 15:36:36 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2021-06-20 15:36:36 -0300 |
commit | 6a0dace25a4b5b77f0fa6911de2ba26ef0fdff2c (patch) | |
tree | 89f2089a6e06f9dde9f827af7a59cbefc47081b4 /lparser.c | |
parent | 04e19712a5d48b84869f9942836ff8314fb0be8e (diff) | |
download | lua-6a0dace25a4b5b77f0fa6911de2ba26ef0fdff2c.tar.gz lua-6a0dace25a4b5b77f0fa6911de2ba26ef0fdff2c.tar.bz2 lua-6a0dace25a4b5b77f0fa6911de2ba26ef0fdff2c.zip |
Bug: 'local function' can assign to '<const>' variables
Diffstat (limited to 'lparser.c')
-rw-r--r-- | lparser.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1785,6 +1785,7 @@ static void funcstat (LexState *ls, int line) { | |||
1785 | luaX_next(ls); /* skip FUNCTION */ | 1785 | luaX_next(ls); /* skip FUNCTION */ |
1786 | ismethod = funcname(ls, &v); | 1786 | ismethod = funcname(ls, &v); |
1787 | body(ls, &b, ismethod, line); | 1787 | body(ls, &b, ismethod, line); |
1788 | check_readonly(ls, &v); | ||
1788 | luaK_storevar(ls->fs, &v, &b); | 1789 | luaK_storevar(ls->fs, &v, &b); |
1789 | luaK_fixline(ls->fs, line); /* definition "happens" in the first line */ | 1790 | luaK_fixline(ls->fs, line); /* definition "happens" in the first line */ |
1790 | } | 1791 | } |