{"action":"opened","issue":{"url":"https://api.github.com/repos/scala-subscript/subscript/issues/5","labels_url":"https://api.github.com/repos/scala-subscript/subscript/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/scala-subscript/subscript/issues/5/comments","events_url":"https://api.github.com/repos/scala-subscript/subscript/issues/5/events","html_url":"https://github.com/scala-subscript/subscript/issues/5","id":114791098,"number":5,"title":"Not possible to use variables in code blocks","user":{"login":"anatoliykmetyuk","id":2614813,"avatar_url":"https://avatars.githubusercontent.com/u/2614813?v=3","gravatar_id":"","url":"https://api.github.com/users/anatoliykmetyuk","html_url":"https://github.com/anatoliykmetyuk","followers_url":"https://api.github.com/users/anatoliykmetyuk/followers","following_url":"https://api.github.com/users/anatoliykmetyuk/following{/other_user}","gists_url":"https://api.github.com/users/anatoliykmetyuk/gists{/gist_id}","starred_url":"https://api.github.com/users/anatoliykmetyuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anatoliykmetyuk/subscriptions","organizations_url":"https://api.github.com/users/anatoliykmetyuk/orgs","repos_url":"https://api.github.com/users/anatoliykmetyuk/repos","events_url":"https://api.github.com/users/anatoliykmetyuk/events{/privacy}","received_events_url":"https://api.github.com/users/anatoliykmetyuk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/scala-subscript/subscript/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-03T11:09:01Z","updated_at":"2015-11-03T11:09:01Z","closed_at":null,"body":"This:\r\n```scala\r\n    live = val a = {\r\n             val x = 3\r\n             println(x)\r\n             x\r\n           }\r\n```\r\nWill fail with this:\r\n```\r\n[error] (compile:compileIncremental) scala.reflect.internal.FatalError: symbol value x#23616 does not exist in Main$$anonfun$live$1.apply, which contains locals value script#23313,value _node#25474.\r\n[error] Method code: final def apply(_node: subscript#29.vm#8491.Script#9187): subscript#29.vm#8491.model#9226.template#18034.concrete#20226.T_localvar#23452 = {\r\n[error]   implicit val script = _node;\r\n[error]   subscript.DSL._val($anonfun$live$1.this.a$1, {\r\n[error]     ((new <$anon: Function1#1720>($anonfun.this, x)): Function1#1720)\r\n[error]   })\r\n[error] }\r\n[error] Total time: 1 s, completed Nov 3, 2015 1:07:33 PM\r\n```\r\nPossibly due to the fact that `val x = 3` is wrapped in a macro."}}