{"action":"created","issue":{"url":"https://api.github.com/repos/sass/libsass/issues/2049","repository_url":"https://api.github.com/repos/sass/libsass","labels_url":"https://api.github.com/repos/sass/libsass/issues/2049/labels{/name}","comments_url":"https://api.github.com/repos/sass/libsass/issues/2049/comments","events_url":"https://api.github.com/repos/sass/libsass/issues/2049/events","html_url":"https://github.com/sass/libsass/issues/2049","id":151020318,"number":2049,"title":"Passing arglists between functions is now broken in 3.3.5","user":{"login":"stowball","id":853552,"avatar_url":"https://avatars.githubusercontent.com/u/853552?v=3","gravatar_id":"","url":"https://api.github.com/users/stowball","html_url":"https://github.com/stowball","followers_url":"https://api.github.com/users/stowball/followers","following_url":"https://api.github.com/users/stowball/following{/other_user}","gists_url":"https://api.github.com/users/stowball/gists{/gist_id}","starred_url":"https://api.github.com/users/stowball/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stowball/subscriptions","organizations_url":"https://api.github.com/users/stowball/orgs","repos_url":"https://api.github.com/users/stowball/repos","events_url":"https://api.github.com/users/stowball/events{/privacy}","received_events_url":"https://api.github.com/users/stowball/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-26T01:41:55Z","updated_at":"2016-04-26T01:52:32Z","closed_at":"2016-04-26T01:52:32Z","body":"This may be related to https://github.com/sass/libsass/issues/2034, but in LibSass v3.3.2, I could create helper functions to pass arglists around - now in v3.3.5 I can't, as my final function returns null.\r\n\r\ninput.scss\r\n```scss\r\n@function get($map, $keys...) {\r\n    @each $key in $keys {\r\n        $map: map-get($map, $key);\r\n    }\r\n\r\n    @return $map;\r\n}\r\n\r\n@function color($keys...) {\r\n    @return get($colors, $keys);\r\n}\r\n\r\n$colors: (\r\n    blue: (\r\n        robins-egg: #00cdcb\r\n    ),\r\n    green: (\r\n        fruit-salad: #51a351\r\n    )\r\n);\r\n\r\na {\r\n    background: get($colors, blue, robins-egg);\r\n    color: color(green, fruit-salad);\r\n}\r\n```\r\n\r\nlibsass 3.3.5\r\n```css\r\na {\r\n  background: #00cdcb; }\r\n```\r\n\r\nlibsass 3.3.2 and ruby sass 3.4.21\r\n```css\r\na {\r\n  background: #00cdcb;\r\n  color: #51a351; }\r\n```\r\n\r\nNotice that using `color()` now fails.\r\n\r\nA somewhat annoying workaround is for `$keys` to no longer be an arglist, and to pass a space-separated list between the functions, like so:\r\n\r\n```scss\r\n@function get($map, $keys) {\r\n    @each $key in $keys {\r\n        $map: map-get($map, $key);\r\n    }\r\n\r\n    @return $map;\r\n}\r\n\r\n@function color($keys) {\r\n    @return get($colors, $keys);\r\n}\r\n\r\n$colors: (\r\n    blue: (\r\n        robins-egg: #00cdcb\r\n    ),\r\n    green: (\r\n        fruit-salad: #51a351\r\n    )\r\n);\r\n\r\na {\r\n    background: get($colors, blue robins-egg);\r\n    color: color(green fruit-salad);\r\n}\r\n```\r\n\r\n\r\nversion info:\r\n```cmd\r\n$ node-sass --version\r\nnode-sass       3.5.3   (Wrapper)       [JavaScript]\r\nlibsass         3.3.5   (Sass Compiler) [C/C++]\r\n```\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/33329402-passing-arglists-between-functions-is-now-broken-in-3-3-5?utm_campaign=plugin&utm_content=tracker%2F283068&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F283068&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/sass/libsass/issues/comments/214583673","html_url":"https://github.com/sass/libsass/issues/2049#issuecomment-214583673","issue_url":"https://api.github.com/repos/sass/libsass/issues/2049","id":214583673,"user":{"login":"xzyfer","id":579928,"avatar_url":"https://avatars.githubusercontent.com/u/579928?v=3","gravatar_id":"","url":"https://api.github.com/users/xzyfer","html_url":"https://github.com/xzyfer","followers_url":"https://api.github.com/users/xzyfer/followers","following_url":"https://api.github.com/users/xzyfer/following{/other_user}","gists_url":"https://api.github.com/users/xzyfer/gists{/gist_id}","starred_url":"https://api.github.com/users/xzyfer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xzyfer/subscriptions","organizations_url":"https://api.github.com/users/xzyfer/orgs","repos_url":"https://api.github.com/users/xzyfer/repos","events_url":"https://api.github.com/users/xzyfer/events{/privacy}","received_events_url":"https://api.github.com/users/xzyfer/received_events","type":"User","site_admin":false},"created_at":"2016-04-26T01:52:32Z","updated_at":"2016-04-26T01:52:32Z","body":"I can confirm the code supplied does not work as expected in Ruby Sass. It may have previously erroneously worked in LibSass due a to a bug that has since been fixed.\r\n\r\nUpdate your `color` function as shown below for get the behaviour you expect.\r\n\r\n```sass\r\n@function color($keys...) {\r\n    @return get($colors, $keys...);\r\n}\r\n```"}}