{"action":"created","issue":{"url":"https://api.github.com/repos/WebAssembly/spec/issues/338","repository_url":"https://api.github.com/repos/WebAssembly/spec","labels_url":"https://api.github.com/repos/WebAssembly/spec/issues/338/labels{/name}","comments_url":"https://api.github.com/repos/WebAssembly/spec/issues/338/comments","events_url":"https://api.github.com/repos/WebAssembly/spec/issues/338/events","html_url":"https://github.com/WebAssembly/spec/issues/338","id":176211234,"number":338,"title":"type error in unreachable code on block-sigs branch ","user":{"login":"sunfishcode","id":4503403,"avatar_url":"https://avatars.githubusercontent.com/u/4503403?v=3","gravatar_id":"","url":"https://api.github.com/users/sunfishcode","html_url":"https://github.com/sunfishcode","followers_url":"https://api.github.com/users/sunfishcode/followers","following_url":"https://api.github.com/users/sunfishcode/following{/other_user}","gists_url":"https://api.github.com/users/sunfishcode/gists{/gist_id}","starred_url":"https://api.github.com/users/sunfishcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sunfishcode/subscriptions","organizations_url":"https://api.github.com/users/sunfishcode/orgs","repos_url":"https://api.github.com/users/sunfishcode/repos","events_url":"https://api.github.com/users/sunfishcode/events{/privacy}","received_events_url":"https://api.github.com/users/sunfishcode/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-11T00:04:22Z","updated_at":"2016-09-11T00:32:54Z","closed_at":null,"body":"The block-sigs branch has this testcase in loop.wast:\r\n```\r\n(assert_invalid\r\n  (module (func $type-cont-last-void-vs-empty (result i32)\r\n    (loop (br 0 (nop)))\r\n  ))\r\n  \"type mismatch\"\r\n)\r\n```\r\nThe end of the function is unreachable, so implementations shouldn't be required to issue a type error here, by my understanding of the rules."},"comment":{"url":"https://api.github.com/repos/WebAssembly/spec/issues/comments/246154197","html_url":"https://github.com/WebAssembly/spec/issues/338#issuecomment-246154197","issue_url":"https://api.github.com/repos/WebAssembly/spec/issues/338","id":246154197,"user":{"login":"JSStats","id":11826073,"avatar_url":"https://avatars.githubusercontent.com/u/11826073?v=3","gravatar_id":"","url":"https://api.github.com/users/JSStats","html_url":"https://github.com/JSStats","followers_url":"https://api.github.com/users/JSStats/followers","following_url":"https://api.github.com/users/JSStats/following{/other_user}","gists_url":"https://api.github.com/users/JSStats/gists{/gist_id}","starred_url":"https://api.github.com/users/JSStats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JSStats/subscriptions","organizations_url":"https://api.github.com/users/JSStats/orgs","repos_url":"https://api.github.com/users/JSStats/repos","events_url":"https://api.github.com/users/JSStats/events{/privacy}","received_events_url":"https://api.github.com/users/JSStats/received_events","type":"User","site_admin":false},"created_at":"2016-09-11T00:32:54Z","updated_at":"2016-09-11T00:32:54Z","body":"With the block signatures, the `loop` has a declared result type, in this case `void` so the validation can easily use that, it does not need to propagate unreachable types. This seems consistent with `(i32.add (f32.neg (unreachable)))` being a type error too, here `f32.neg` has a declared type which is used even though it's result is unreachable.\r\n\r\nThis also seems to be related to https://github.com/WebAssembly/design/issues/778"}}
{"actor":{"display_login":"JSStats"}}