mirror of
https://github.com/lua/lua
synced 2026-09-26 16:17:11 +03:00
Global initialization checks name conflict
Initialization "global a = 10" raises an error if global 'a' is already defined, that is, it has a non-nil value.
This commit is contained in:
parent
f791bb6906
commit
e44f3a2ffc
13 changed files with 87 additions and 9 deletions
|
|
@ -340,6 +340,8 @@ OP_VARARG,/* A C R[A], R[A+1], ..., R[A+C-2] = vararg */
|
|||
|
||||
OP_GETVARG, /* A B C R[A] := R[B][R[C]], R[B] is vararg parameter */
|
||||
|
||||
OP_ERRNNIL,/* A Bx raise error if R[A] ~= nil (K[Bx] is global name)*/
|
||||
|
||||
OP_VARARGPREP,/* (adjust vararg parameters) */
|
||||
|
||||
OP_EXTRAARG/* Ax extra (larger) argument for previous opcode */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue