{"action":"created","issue":{"url":"https://api.github.com/repos/Araq/Nim/issues/936","labels_url":"https://api.github.com/repos/Araq/Nim/issues/936/labels{/name}","comments_url":"https://api.github.com/repos/Araq/Nim/issues/936/comments","events_url":"https://api.github.com/repos/Araq/Nim/issues/936/events","html_url":"https://github.com/Araq/Nim/issues/936","id":27746492,"number":936,"title":"Integer implicit conversion problems","user":{"login":"ReneSac","id":6010063,"avatar_url":"https://avatars.githubusercontent.com/u/6010063?v=3","gravatar_id":"","url":"https://api.github.com/users/ReneSac","html_url":"https://github.com/ReneSac","followers_url":"https://api.github.com/users/ReneSac/followers","following_url":"https://api.github.com/users/ReneSac/following{/other_user}","gists_url":"https://api.github.com/users/ReneSac/gists{/gist_id}","starred_url":"https://api.github.com/users/ReneSac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReneSac/subscriptions","organizations_url":"https://api.github.com/users/ReneSac/orgs","repos_url":"https://api.github.com/users/ReneSac/repos","events_url":"https://api.github.com/users/ReneSac/events{/privacy}","received_events_url":"https://api.github.com/users/ReneSac/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Araq/Nim/labels/High+Priority","name":"High Priority","color":"e30c0c"},{"url":"https://api.github.com/repos/Araq/Nim/labels/unsigned","name":"unsigned","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2014-02-17T20:16:45Z","updated_at":"2015-01-17T11:19:30Z","closed_at":null,"body":"Maybe this should be divided in many different issues, but here a compilation of bugs with implicit conversions that should work, mostly concerning unsigned types:\r\n\r\n```nimrod\r\nimport unsigned\r\n\r\nproc uintConvTest() = \r\n  var b:byte = 5 # the only line here that works.\r\n  var y:int = b + 2  # Error: type mismatch: got (Byte) but expected 'int'\r\n  \r\n  var u:uint32 = 2147483648  # Error: type mismatch: got (int64) but expected 'uint32'\r\n  assert u > 0  # Error: type mismatch: got (int literal(0), uint32) \r\n  assert u == 2147483648 # Error: type mismatch: got (uint32, int64)\r\n\r\nproc intConvTest() =\r\n  let x = 5000'i8\r\n  echo 5000'i8, \" == \", x # 5000 == -120\r\n  \r\nintConvTest()\r\nuintConvTest()\r\n```"},"comment":{"url":"https://api.github.com/repos/Araq/Nim/issues/comments/70363353","html_url":"https://github.com/Araq/Nim/issues/936#issuecomment-70363353","issue_url":"https://api.github.com/repos/Araq/Nim/issues/936","id":70363353,"user":{"login":"skyfex","id":773906,"avatar_url":"https://avatars.githubusercontent.com/u/773906?v=3","gravatar_id":"","url":"https://api.github.com/users/skyfex","html_url":"https://github.com/skyfex","followers_url":"https://api.github.com/users/skyfex/followers","following_url":"https://api.github.com/users/skyfex/following{/other_user}","gists_url":"https://api.github.com/users/skyfex/gists{/gist_id}","starred_url":"https://api.github.com/users/skyfex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skyfex/subscriptions","organizations_url":"https://api.github.com/users/skyfex/orgs","repos_url":"https://api.github.com/users/skyfex/repos","events_url":"https://api.github.com/users/skyfex/events{/privacy}","received_events_url":"https://api.github.com/users/skyfex/received_events","type":"User","site_admin":false},"created_at":"2015-01-17T11:19:30Z","updated_at":"2015-01-17T11:19:30Z","body":"Btw, branch with implicit uint->int conversion are now back up on:\r\n\r\nhttps://github.com/skyfex/Nim/tree/uintconv"}}