{"action":"created","issue":{"url":"https://api.github.com/repos/crystal-lang/crystal/issues/2746","repository_url":"https://api.github.com/repos/crystal-lang/crystal","labels_url":"https://api.github.com/repos/crystal-lang/crystal/issues/2746/labels{/name}","comments_url":"https://api.github.com/repos/crystal-lang/crystal/issues/2746/comments","events_url":"https://api.github.com/repos/crystal-lang/crystal/issues/2746/events","html_url":"https://github.com/crystal-lang/crystal/issues/2746","id":158510107,"number":2746,"title":"Parenthesisless method call with (named) tuple arg does not work ","user":{"login":"pkorotkov","id":532567,"avatar_url":"https://avatars.githubusercontent.com/u/532567?v=3","gravatar_id":"","url":"https://api.github.com/users/pkorotkov","html_url":"https://github.com/pkorotkov","followers_url":"https://api.github.com/users/pkorotkov/followers","following_url":"https://api.github.com/users/pkorotkov/following{/other_user}","gists_url":"https://api.github.com/users/pkorotkov/gists{/gist_id}","starred_url":"https://api.github.com/users/pkorotkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkorotkov/subscriptions","organizations_url":"https://api.github.com/users/pkorotkov/orgs","repos_url":"https://api.github.com/users/pkorotkov/repos","events_url":"https://api.github.com/users/pkorotkov/events{/privacy}","received_events_url":"https://api.github.com/users/pkorotkov/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/crystal-lang/crystal/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-06-04T15:42:59Z","updated_at":"2016-06-04T15:52:58Z","closed_at":null,"body":"This code does not work as expected (a similar error is thrown in case of named tuples):\r\n```crystal\r\ndef f(t : Tuple(Int32)) : Nil\r\nend\r\n\r\nf({7}) # <- Works OK.\r\nf {7}  # <- Error.\r\n```\r\n[#link](https://play.crystal-lang.org/#/r/10rd)"},"comment":{"url":"https://api.github.com/repos/crystal-lang/crystal/issues/comments/223762882","html_url":"https://github.com/crystal-lang/crystal/issues/2746#issuecomment-223762882","issue_url":"https://api.github.com/repos/crystal-lang/crystal/issues/2746","id":223762882,"user":{"login":"asterite","id":209371,"avatar_url":"https://avatars.githubusercontent.com/u/209371?v=3","gravatar_id":"","url":"https://api.github.com/users/asterite","html_url":"https://github.com/asterite","followers_url":"https://api.github.com/users/asterite/followers","following_url":"https://api.github.com/users/asterite/following{/other_user}","gists_url":"https://api.github.com/users/asterite/gists{/gist_id}","starred_url":"https://api.github.com/users/asterite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asterite/subscriptions","organizations_url":"https://api.github.com/users/asterite/orgs","repos_url":"https://api.github.com/users/asterite/repos","events_url":"https://api.github.com/users/asterite/events{/privacy}","received_events_url":"https://api.github.com/users/asterite/received_events","type":"User","site_admin":false},"created_at":"2016-06-04T15:52:58Z","updated_at":"2016-06-04T15:52:58Z","body":"Consider this:\r\n\r\n```crystal\r\n# parser sees this, it says: let's try and see if it's a tuple or a hash\r\nfoo {\r\n  # parser sees \"x, \", says \"hm... looks like we've got a tuple here!\r\n  # continues a bit more... oh, no, it's not a tuple, it's a block. I have to go back\r\n  x, y = 1, 2\r\n puts x, y\r\n}\r\n```\r\n\r\nBasically yes, some cases are more obvious than other, but we can't have the parser work well in simple cases and work bad in complex cases. It's better to just require a parentheses in this case."}}
{"actor":{"display_login":"asterite"}}