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
global type Boss1 = record
name: string
age: integer
end
global record Boss2
name: string
age: integer
end
local record Boss3
name: string
age: integer
end
Generates 3 assignments:
Boss1 = {}
Boss2 = {}
local Boss3 = {}
Another example from tutorial:
local record Color
red: integer
green: integer
blue: integer
end
Generates Color = {}
But if we add declare another variable
local record Color
red: integer
green: integer
blue: integer
end
local teal_color <total>: Color = {
red = 0,
green = 128,
blue = 128,
}
The assignment is gone!
local teal_color = {
red = 0,
green = 128,
blue = 128,
}
Why type (structure shape) declaration generates variable assignment? Why this assignment sometimes disappear?
The text was updated successfully, but these errors were encountered:
This is now fixed in master: unused global types still generate the empty table, as those declarations may be used as a table from other modules, but unused local types now don't generate any code.
Could you explain this strange behavior?
Generates 3 assignments:
Another example from tutorial:
Generates
Color = {}
But if we add declare another variable
The assignment is gone!
Why type (structure shape) declaration generates variable assignment? Why this assignment sometimes disappear?
The text was updated successfully, but these errors were encountered: