{"action":"created","issue":{"url":"https://api.github.com/repos/elliotchance/c2go/issues/428","repository_url":"https://api.github.com/repos/elliotchance/c2go","labels_url":"https://api.github.com/repos/elliotchance/c2go/issues/428/labels{/name}","comments_url":"https://api.github.com/repos/elliotchance/c2go/issues/428/comments","events_url":"https://api.github.com/repos/elliotchance/c2go/issues/428/events","html_url":"https://github.com/elliotchance/c2go/issues/428","id":280222600,"number":428,"title":"_Bool test","user":{"login":"Konstantin8105","id":16690032,"avatar_url":"https://avatars2.githubusercontent.com/u/16690032?v=4","gravatar_id":"","url":"https://api.github.com/users/Konstantin8105","html_url":"https://github.com/Konstantin8105","followers_url":"https://api.github.com/users/Konstantin8105/followers","following_url":"https://api.github.com/users/Konstantin8105/following{/other_user}","gists_url":"https://api.github.com/users/Konstantin8105/gists{/gist_id}","starred_url":"https://api.github.com/users/Konstantin8105/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Konstantin8105/subscriptions","organizations_url":"https://api.github.com/users/Konstantin8105/orgs","repos_url":"https://api.github.com/users/Konstantin8105/repos","events_url":"https://api.github.com/users/Konstantin8105/events{/privacy}","received_events_url":"https://api.github.com/users/Konstantin8105/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-12-07T17:56:30Z","updated_at":"2017-12-12T01:27:01Z","closed_at":"2017-12-12T01:27:01Z","author_association":"CONTRIBUTOR","body":"```c\r\n#include<stdio.h>\r\n_Bool f(_Bool b){\r\n        return  b;\r\n}\r\nint main(){\r\n        _Bool b = 0;\r\n        if (b){\r\n                b++;\r\n        }\r\n        _Bool c = f(b);\r\n        b = b + c;\r\n        int i = (int)(b);\r\n        printf(\"%d\\n\",i);\r\n        return 0;\r\n}\r\n```\r\n```\r\n○ → gcc 2.c; ./a.out\r\n0\r\n```\r\nGo:\r\n```go\r\nfunc f(b bool) bool {\r\n        return b\r\n}\r\nfunc main() {\r\n        __init()\r\n        var b bool = 0 != 0\r\n        if b {\r\n                func() bool {\r\n                        b += 1\r\n                        return b\r\n                }()\r\n        }\r\n        var c bool = f(b)\r\n        b = b+c\r\n        var i int = map[bool]int{false: 0, true: 1}[map[bool]int{false: 0, true: 1}[(b)]]\r\n        noarch.Printf([]byte(\"%d\\n\\x00\"), i)\r\n        return\r\n}\r\n```\r\n```\r\n○ → go build 2.go\r\n# command-line-arguments\r\n./2.go:190:6: cannot convert 1 to type bool\r\n./2.go:190:6: invalid operation: b += 1 (mismatched types bool and int)\r\n./2.go:195:7: invalid operation: b + c (operator + not defined on bool)\r\n./2.go:196:45: cannot use map[bool]int literal[b] (type int) as type bool in map index\r\n```"},"comment":{"url":"https://api.github.com/repos/elliotchance/c2go/issues/comments/350914823","html_url":"https://github.com/elliotchance/c2go/issues/428#issuecomment-350914823","issue_url":"https://api.github.com/repos/elliotchance/c2go/issues/428","id":350914823,"user":{"login":"elliotchance","id":927418,"avatar_url":"https://avatars1.githubusercontent.com/u/927418?v=4","gravatar_id":"","url":"https://api.github.com/users/elliotchance","html_url":"https://github.com/elliotchance","followers_url":"https://api.github.com/users/elliotchance/followers","following_url":"https://api.github.com/users/elliotchance/following{/other_user}","gists_url":"https://api.github.com/users/elliotchance/gists{/gist_id}","starred_url":"https://api.github.com/users/elliotchance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elliotchance/subscriptions","organizations_url":"https://api.github.com/users/elliotchance/orgs","repos_url":"https://api.github.com/users/elliotchance/repos","events_url":"https://api.github.com/users/elliotchance/events{/privacy}","received_events_url":"https://api.github.com/users/elliotchance/received_events","type":"User","site_admin":false},"created_at":"2017-12-12T01:27:01Z","updated_at":"2017-12-12T01:27:01Z","author_association":"OWNER","body":"Fixed in #445 "}}
{"actor":{"display_login":"elliotchance"}}