{"action":"closed","issue":{"url":"https://api.github.com/repos/WebAssembly/sexpr-wasm-prototype/issues/82","repository_url":"https://api.github.com/repos/WebAssembly/sexpr-wasm-prototype","labels_url":"https://api.github.com/repos/WebAssembly/sexpr-wasm-prototype/issues/82/labels{/name}","comments_url":"https://api.github.com/repos/WebAssembly/sexpr-wasm-prototype/issues/82/comments","events_url":"https://api.github.com/repos/WebAssembly/sexpr-wasm-prototype/issues/82/events","html_url":"https://github.com/WebAssembly/sexpr-wasm-prototype/issues/82","id":158803290,"number":82,"title":"Return nop arity","user":{"login":"Cellule","id":4157103,"avatar_url":"https://avatars.githubusercontent.com/u/4157103?v=3","gravatar_id":"","url":"https://api.github.com/users/Cellule","html_url":"https://github.com/Cellule","followers_url":"https://api.github.com/users/Cellule/followers","following_url":"https://api.github.com/users/Cellule/following{/other_user}","gists_url":"https://api.github.com/users/Cellule/gists{/gist_id}","starred_url":"https://api.github.com/users/Cellule/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cellule/subscriptions","organizations_url":"https://api.github.com/users/Cellule/orgs","repos_url":"https://api.github.com/users/Cellule/repos","events_url":"https://api.github.com/users/Cellule/events{/privacy}","received_events_url":"https://api.github.com/users/Cellule/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-06-07T00:13:47Z","updated_at":"2016-08-04T08:07:54Z","closed_at":"2016-08-04T08:07:54Z","body":"For the following function \r\n`(func $return-nop (return (nop)))` (https://github.com/WebAssembly/testsuite/blob/master/functions.wast)\r\n\r\nThere is a conflict between the function type and return arity.\r\nThe type of the function is \r\n```\r\n; type 0\r\n000000f: 40                                         ; function form\r\n0000010: 00                                         ; num params\r\n0000011: 00                                         ; num results\r\n```\r\nAnd the function body is the following\r\n```\r\n; function body 6\r\n00001a0: 00                                         ; func body size (guess)\r\n00001a1: 00                                         ; local decl count\r\n00001a2: 00                                         ; OPCODE_NOP\r\n00001a3: 09                                         ; OPCODE_RETURN\r\n00001a4: 01                                         ; return arity\r\n00001a0: 04                                         ; FIXUP func body size\r\n```\r\n\r\nSince `nop` is: [an empty operator that does not yield a value](https://github.com/WebAssembly/design/blob/master/AstSemantics.md#control-flow-structures)\r\nthen the arity of the return statement should be 0 thus having a valid type.\r\n\r\nI found this by running the tests, I am surprised this didn't come up in the CI"}}
{"actor":{"display_login":"Cellule"}}