lua-users home
lua-l archive

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


It was thus said that the Great Egor Skriptunoff once stated:
> 
> IMO, "to-be-closed variable accidental assignment alert" should be moved
> from Lua core into external software (such as luacheck)
> Besides, it would be useful to have non-constant to-be-closed variables

  So, what exactly should happen in this code?

	local <toclose> f = io.open("a")
	local x = f
	f = io.open("b") -- should 'a' be closed?  or not because of x
	f = io.open("c") -- should 'b' be closed?
	
  -spc (Trying to pin down semantics here ... )