{"action":"created","issue":{"url":"https://api.github.com/repos/crystal-lang/crystal/issues/4467","repository_url":"https://api.github.com/repos/crystal-lang/crystal","labels_url":"https://api.github.com/repos/crystal-lang/crystal/issues/4467/labels{/name}","comments_url":"https://api.github.com/repos/crystal-lang/crystal/issues/4467/comments","events_url":"https://api.github.com/repos/crystal-lang/crystal/issues/4467/events","html_url":"https://github.com/crystal-lang/crystal/issues/4467","id":231657146,"number":4467,"title":"A bug in the playground due to a method call after a parenthesized assignment","user":{"login":"jbomanson","id":11866614,"avatar_url":"https://avatars2.githubusercontent.com/u/11866614?v=3","gravatar_id":"","url":"https://api.github.com/users/jbomanson","html_url":"https://github.com/jbomanson","followers_url":"https://api.github.com/users/jbomanson/followers","following_url":"https://api.github.com/users/jbomanson/following{/other_user}","gists_url":"https://api.github.com/users/jbomanson/gists{/gist_id}","starred_url":"https://api.github.com/users/jbomanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbomanson/subscriptions","organizations_url":"https://api.github.com/users/jbomanson/orgs","repos_url":"https://api.github.com/users/jbomanson/repos","events_url":"https://api.github.com/users/jbomanson/events{/privacy}","received_events_url":"https://api.github.com/users/jbomanson/received_events","type":"User","site_admin":false},"labels":[{"id":20487867,"url":"https://api.github.com/repos/crystal-lang/crystal/labels/kind:bug","name":"kind:bug","color":"fc2929","default":false},{"id":346039397,"url":"https://api.github.com/repos/crystal-lang/crystal/labels/topic:playground","name":"topic:playground","color":"207de5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-05-26T15:20:21Z","updated_at":"2017-06-14T01:12:42Z","closed_at":null,"body":"The following code works fine when executed with `crystal run`, but in the playground it brings up the bug popup.\r\n\r\n```crystal\r\n(y = 1).itself\r\ny\r\n```\r\n\r\nI am running `Crystal 0.22.0 [3c71228] (2017-04-20) LLVM 3.5.0` on Ubuntu 16.04 LTS."},"comment":{"url":"https://api.github.com/repos/crystal-lang/crystal/issues/comments/308291343","html_url":"https://github.com/crystal-lang/crystal/issues/4467#issuecomment-308291343","issue_url":"https://api.github.com/repos/crystal-lang/crystal/issues/4467","id":308291343,"user":{"login":"bcardiff","id":459923,"avatar_url":"https://avatars2.githubusercontent.com/u/459923?v=3","gravatar_id":"","url":"https://api.github.com/users/bcardiff","html_url":"https://github.com/bcardiff","followers_url":"https://api.github.com/users/bcardiff/followers","following_url":"https://api.github.com/users/bcardiff/following{/other_user}","gists_url":"https://api.github.com/users/bcardiff/gists{/gist_id}","starred_url":"https://api.github.com/users/bcardiff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcardiff/subscriptions","organizations_url":"https://api.github.com/users/bcardiff/orgs","repos_url":"https://api.github.com/users/bcardiff/repos","events_url":"https://api.github.com/users/bcardiff/events{/privacy}","received_events_url":"https://api.github.com/users/bcardiff/received_events","type":"User","site_admin":false},"created_at":"2017-06-14T01:12:42Z","updated_at":"2017-06-14T01:12:42Z","body":"@jbomanson the `is_a?`/`responds_to?` pseudo methods is indeed a different issue. And is actually not the playground but the `ToSVisitor` that might not be emitting the parenthesis probably if the receiver is a complex expression.\r\n\r\nThe later `(z = 1).divisible_by?(1)` is indeed another use case that is complicated.\r\n\r\nMaybe the secure thing here to be done is to not instrument lines that the outer node is not an assignment, but it contain assignments somewhere (that is not a block). \r\n\r\nAt least that way there wont be changes in the semantics and both samples should work (with less instrumentation results shown in the right panel).\r\n\r\n"}}
{"actor":{"display_login":"bcardiff"}}