Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- do local a = {}; a[1], a = 1, 2 end
- do local a = {}; a[1], a = (function() a = nil end)(), 2 end
- do a = {}; a[1] = (function() a = nil end)() end
- -- uh oh. this one indexes nil
- do local a = {}; a[1] = (function() a = nil end)() end -- error!
- -- and of course there's nastier examples
- do
- local a = {}
- local b = setmetatable({}, { __add = function() a = nil end })
- a[1] = b + 0 -- bang! fails as well
- end
Advertisement
Add Comment
Please, Sign In to add comment