{"action":"closed","issue":{"url":"https://api.github.com/repos/andrewrk/zig/issues/210","repository_url":"https://api.github.com/repos/andrewrk/zig","labels_url":"https://api.github.com/repos/andrewrk/zig/issues/210/labels{/name}","comments_url":"https://api.github.com/repos/andrewrk/zig/issues/210/comments","events_url":"https://api.github.com/repos/andrewrk/zig/issues/210/events","html_url":"https://github.com/andrewrk/zig/issues/210","id":186979781,"number":210,"title":"+=% bug","user":{"login":"stereosteve","id":97163,"avatar_url":"https://avatars.githubusercontent.com/u/97163?v=3","gravatar_id":"","url":"https://api.github.com/users/stereosteve","html_url":"https://github.com/stereosteve","followers_url":"https://api.github.com/users/stereosteve/followers","following_url":"https://api.github.com/users/stereosteve/following{/other_user}","gists_url":"https://api.github.com/users/stereosteve/gists{/gist_id}","starred_url":"https://api.github.com/users/stereosteve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stereosteve/subscriptions","organizations_url":"https://api.github.com/users/stereosteve/orgs","repos_url":"https://api.github.com/users/stereosteve/repos","events_url":"https://api.github.com/users/stereosteve/events{/privacy}","received_events_url":"https://api.github.com/users/stereosteve/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-03T05:07:51Z","updated_at":"2016-11-03T05:09:31Z","closed_at":"2016-11-03T05:09:31Z","body":"`+%` works as expected but `+=%` results in:\r\n\r\n```\r\nzig: /home/ubuntu/zig/src/analyze.cpp:414: TypeTableEntry* get_error_type(CodeGen*, TypeTableEntry*): Assertion `child_type->type_ref' failed.\r\nAborted (core dumped)\r\n```\r\n\r\nexample program:\r\n\r\n```\r\nconst c = @cImport(@cInclude(\"stdio.h\"));\r\n\r\nexport fn main(argc: c_int, argv: &&u8) -> c_int {\r\n\r\n    // works as expected... prints 1\r\n    {\r\n        var num: u8 = 254;\r\n        num = num +% 3;\r\n        c.printf(c\"Hello, %u !\\n\", num);\r\n    }\r\n\r\n    // zig: /home/ubuntu/zig/src/analyze.cpp:414: TypeTableEntry* get_error_type(CodeGen*, TypeTableEntry*): Assertion `child_type->type_ref' failed.\r\n    // Aborted (core dumped)\r\n    {\r\n        var num: u8 = 254;\r\n        num +=% 3;\r\n        c.printf(c\"Hello, %u !\\n\", num);\r\n    }\r\n\r\n    return 0;\r\n}\r\n```\r\n\r\nIs this the correct usage of `+=%`? "}}
{"actor":{"display_login":"stereosteve"}}