lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


At 21:20 2002-11-01 -0300, you wrote:

Emitting warnings is not so simple for embedded languages.

Why not make it an error, if the behaviour is undefined when
assigning the index value in a for body?
And if it is not too complex to detect.

Like this code gives the following error:

  local x = 1
  function f() print (x) end

error: cannot access a variable in outer scope;

(in lua 4, I believe this is different in lua 5?)

Just a thought.

Mattias