[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Class:function problem
- From: Steve Dekorte <steve@...>
- Date: Thu, 13 Jul 2000 01:29:43 -0700
This code works:
--------------------------------
$debug
myFunc = function ()
Test = {}
Test.init = function (self) end
end
--------------------------------
This code doesn't:
--------------------------------
$debug
myFunc = function ()
Test = {}
function Test:init() end
end
--------------------------------
Lua says:
lua error: `end' expected (to close `function' at line 3);
last token read: `function' at line 5 in file `test.lua'
Am I doing something wrong or is this a bug in Lua?
I thought "a:b()" was syntaxical sugar for "a.b(a)"(?)
Steve