lua-users home
lua-l archive

Re: Bug in constructors (3.2 and 4.0a)

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


> function foo()
> local a
> bar = function()
> x = { a=1 } --> error: cannot access outer var 'a'
> end
> end
	Funny! The following code does work:
 function foo()
 local a
 bar = function()
 x = { b=2, a=1 }
 end
 end
	But changing the order ( { a=1, b=2 } ) it doesn't.
	Tomas

AltStyle によって変換されたページ (->オリジナル) /