-
Notifications
You must be signed in to change notification settings - Fork 196
Closed
Description
Forgive me if I'm just using this incorrectly, but whenever I try to use the local ^
syntax followed by a class declaration, I get the below error.
Compile error: [string "moonscript.lua"]:562: attempt to index field '?' (a nil value)
stack traceback:
[string "moonscript.lua"]:562: in function 'transformer'
[string "moonscript.lua"]:309: in function <[string "moonscript.lua"]:300>
(tail call): ?
[string "moonscript.lua"]:4858: in function 'stm'
[string "moonscript.lua"]:4897: in function <[string "moonscript.lua"]:4888>
(tail call): ?
(tail call): ?
This is an example of the code that causes the error for me:
local ^
lowercase = 5
Uppercase = 3
class MyClass
new: =>
print 'hi'
Moving the class declaration before the line with local ^
fixes the issue, and local *
also works. It doesn't seem to matter if the class name is uppercase, or if the class has a name at all, e.g. the code below still errors:
local ^
lowercase = 5
Uppercase = 5
class
Using version 0.4.0. thanks (:
Metadata
Metadata
Assignees
Labels
No labels