Open b0ryakha opened 3 days ago
Do you have an example of the code of the module that requires oop.tl?
Simplified example:
require("widget")
require("oop")
global record Label
text: string
end
function Label:new(parent: Widget, text: string): Label
local self = extends(Label, Widget, parent)
self.text = text or ""
return self
end
widget.tl in 'sources' folder.
When I use tl check on a project, it finds an incomprehensible error: "sources\oop.tl:5:8: cannot redeclare global with a different type: previous type of extends is function(Child, Base, ...: ): Child"
The error began to appear only after I moved some files (which use oop.tl) to the widgets subfolder. At the same time, tl gen correctly generates lua files and everything works.
Example of the project structure:
tlconfig.lua:
oop.tl:
building: