I just noticed that this isn’t type stable.
function baz()
local x
function bar()
x = 2
end
bar()
x
end
baz() # returns 2

Is there a better way of doing this?
I just noticed that this isn’t type stable.
function baz()
local x
function bar()
x = 2
end
bar()
x
end
baz() # returns 2

Is there a better way of doing this?