You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Teal supports requiring regular Lua file given that a special definition file is created.
For instance test.lua
local M = {}
local a
local b
a = 5
b = a + 2
M.c = b
return M
Definition file test.d.tl
local record test
c: number
end
return test
When invoking command line tl it doesn't give any errors:
TealBug % tl check main/main.tl
========================================
Type checked main/main.tl
0 errors detected -- you can use:
tl run main/main.tl
to run main/main.tl as a program
tl gen main/main.tl
to generate main.lua
tl gen also works.
But when trying to build with Defold an error appears
/tlconfig.lua
Line 3: variable 'a' has no type or initial value
Line 4: variable 'b' has no type or initial value
Somehow the original Lua module (test.lua) gets treated as a Teal source which results in compilation errors
Teal supports requiring regular Lua file given that a special definition file is created.
For instance test.lua
Definition file test.d.tl
When invoking command line
tl
it doesn't give any errors:tl gen
also works.But when trying to build with Defold an error appears
Somehow the original Lua module (test.lua) gets treated as a Teal source which results in compilation errors
Test project:
TealBug.zip
The text was updated successfully, but these errors were encountered: