{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/hhvm/issues/4858","repository_url":"https://api.github.com/repos/facebook/hhvm","labels_url":"https://api.github.com/repos/facebook/hhvm/issues/4858/labels{/name}","comments_url":"https://api.github.com/repos/facebook/hhvm/issues/4858/comments","events_url":"https://api.github.com/repos/facebook/hhvm/issues/4858/events","html_url":"https://github.com/facebook/hhvm/issues/4858","id":58110224,"number":4858,"title":"Type hinting variadic arguments","user":{"login":"milesj","id":143744,"avatar_url":"https://avatars.githubusercontent.com/u/143744?v=3","gravatar_id":"","url":"https://api.github.com/users/milesj","html_url":"https://github.com/milesj","followers_url":"https://api.github.com/users/milesj/followers","following_url":"https://api.github.com/users/milesj/following{/other_user}","gists_url":"https://api.github.com/users/milesj/gists{/gist_id}","starred_url":"https://api.github.com/users/milesj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milesj/subscriptions","organizations_url":"https://api.github.com/users/milesj/orgs","repos_url":"https://api.github.com/users/milesj/repos","events_url":"https://api.github.com/users/milesj/events{/privacy}","received_events_url":"https://api.github.com/users/milesj/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/facebook/hhvm/labels/hack","name":"hack","color":"fe8700"},{"url":"https://api.github.com/repos/facebook/hhvm/labels/probably%20easy","name":"probably easy","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"fredemmott","id":360927,"avatar_url":"https://avatars.githubusercontent.com/u/360927?v=3","gravatar_id":"","url":"https://api.github.com/users/fredemmott","html_url":"https://github.com/fredemmott","followers_url":"https://api.github.com/users/fredemmott/followers","following_url":"https://api.github.com/users/fredemmott/following{/other_user}","gists_url":"https://api.github.com/users/fredemmott/gists{/gist_id}","starred_url":"https://api.github.com/users/fredemmott/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredemmott/subscriptions","organizations_url":"https://api.github.com/users/fredemmott/orgs","repos_url":"https://api.github.com/users/fredemmott/repos","events_url":"https://api.github.com/users/fredemmott/events{/privacy}","received_events_url":"https://api.github.com/users/fredemmott/received_events","type":"User","site_admin":false},"milestone":null,"comments":8,"created_at":"2015-02-18T18:49:31Z","updated_at":"2016-03-17T00:26:51Z","closed_at":null,"body":"If we don't type hint variadic arguments we get this following type checker error.\r\n\r\n    Was expecting a type hint (what about: array)\r\n\r\nIf we do type hint them, the type checker error goes away, but then we get this runtime error.\r\n\r\n    Fatal error: Parameter $args is variadic and has a type constraint (array); variadic params with type constraints are not supported\r\n\r\nWhat's the best way to go about this?"},"comment":{"url":"https://api.github.com/repos/facebook/hhvm/issues/comments/197621161","html_url":"https://github.com/facebook/hhvm/issues/4858#issuecomment-197621161","issue_url":"https://api.github.com/repos/facebook/hhvm/issues/4858","id":197621161,"user":{"login":"mschwager","id":1724818,"avatar_url":"https://avatars.githubusercontent.com/u/1724818?v=3","gravatar_id":"","url":"https://api.github.com/users/mschwager","html_url":"https://github.com/mschwager","followers_url":"https://api.github.com/users/mschwager/followers","following_url":"https://api.github.com/users/mschwager/following{/other_user}","gists_url":"https://api.github.com/users/mschwager/gists{/gist_id}","starred_url":"https://api.github.com/users/mschwager/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mschwager/subscriptions","organizations_url":"https://api.github.com/users/mschwager/orgs","repos_url":"https://api.github.com/users/mschwager/repos","events_url":"https://api.github.com/users/mschwager/events{/privacy}","received_events_url":"https://api.github.com/users/mschwager/received_events","type":"User","site_admin":false},"created_at":"2016-03-17T00:26:51Z","updated_at":"2016-03-17T00:26:51Z","body":"`HH_FIXME[4033]` doesn't work for type hinted variadics:\r\n\r\n```\r\n$ cat test.php \r\n<?php\r\n\r\nfunction test(/* HH_FIXME[4033] */ int ...$numbers) {\r\n    echo array_sum($numbers);\r\n}\r\n\r\ntest(1, 2, 3);\r\n\r\n$ hhvm test.php \r\nFatal error: Parameter $numbers is variadic and has a type constraint (int); variadic params with type constraints are not supported in /path/to/test.php on line 3\r\n\r\n$ php test.php \r\n6\r\n```\r\n\r\nAny thoughts on how to remedy this?"}}