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
local interface thing
x:string
end
local things:{thing} = {};
for i = 1, #things do
local t:thing = things[i];
print(t.x);
end
This is the output of tlc things.tl:
things.tl:10:8: type error, attempt to assign 'thing?' to 'thing'
local t:thing = things[i];
^
things.tl:11:8: type error, attempt to index 'thing?' with '"x"'
print(t.x);
^
Why is this? How do I tell it that I'm really sure that it's not out of bounds?
The text was updated successfully, but these errors were encountered:
This is
things.tl
:This is the output of
tlc things.tl
:Why is this? How do I tell it that I'm really sure that it's not out of bounds?
The text was updated successfully, but these errors were encountered: