lua-users home
lua-l archive

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


   Hi everyone !

I am facing a little problem: in the following code, the first
declaration is accepted by luac, but not the second one. Is it
expected behavior, or a bug (eg can functions be defined in
another functions body)?
Declaring it without object style syntax works.
I am using Lua 3.1, Visual C 6 compiled on NT 4, though I
doubt the latter information would affect this behavior.

Thanks !

-------------------->8-------------------
table={}

function table:method1()
end

function test()
  function table:method2()
  end
end
-------------------->8-------------------

--vp