{"action":"closed","issue":{"url":"https://api.github.com/repos/xanathar/moonsharp/issues/120","labels_url":"https://api.github.com/repos/xanathar/moonsharp/issues/120/labels{/name}","comments_url":"https://api.github.com/repos/xanathar/moonsharp/issues/120/comments","events_url":"https://api.github.com/repos/xanathar/moonsharp/issues/120/events","html_url":"https://github.com/xanathar/moonsharp/issues/120","id":121320960,"number":120,"title":"\"local\" doesn't work rigth","user":{"login":"j0le","id":12073565,"avatar_url":"https://avatars.githubusercontent.com/u/12073565?v=3","gravatar_id":"","url":"https://api.github.com/users/j0le","html_url":"https://github.com/j0le","followers_url":"https://api.github.com/users/j0le/followers","following_url":"https://api.github.com/users/j0le/following{/other_user}","gists_url":"https://api.github.com/users/j0le/gists{/gist_id}","starred_url":"https://api.github.com/users/j0le/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j0le/subscriptions","organizations_url":"https://api.github.com/users/j0le/orgs","repos_url":"https://api.github.com/users/j0le/repos","events_url":"https://api.github.com/users/j0le/events{/privacy}","received_events_url":"https://api.github.com/users/j0le/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/xanathar/moonsharp/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-09T19:30:59Z","updated_at":"2015-12-21T12:12:25Z","closed_at":"2015-12-21T12:12:25Z","body":"The keyword \"local\" did not work as expected:\r\n\r\nSample Code:\r\n```lua\r\n--test local keyword\r\nlocal hi = 'hello'\r\n\r\nlocal function test()\r\n    print(hi)\r\nend\r\n\r\n\r\n-- local hi = 'X'   --try this     (new local)\r\n--       hi = 'X'   --and try this (no new local)\r\n\r\n\r\n--          it should be like this:                 | but it is: \r\n--case:     nothing     new local     no new local  | nothing     new local     no new local\r\ntest()   -- hello       X             X             | hello       X             X           \r\nprint(hi)-- hello       hello         X             | hello       X (wrong)     X           \r\n\r\n```\r\nyou can check this on: http://www.lua.org/cgi-bin/demo"}}