{"action":"closed","issue":{"url":"https://api.github.com/repos/privat/nit/issues/1439","labels_url":"https://api.github.com/repos/privat/nit/issues/1439/labels{/name}","comments_url":"https://api.github.com/repos/privat/nit/issues/1439/comments","events_url":"https://api.github.com/repos/privat/nit/issues/1439/events","html_url":"https://github.com/privat/nit/issues/1439","id":85196871,"number":1439,"title":"Adaptative typing bug","user":{"login":"R4PaSs","id":1444825,"avatar_url":"https://avatars.githubusercontent.com/u/1444825?v=3","gravatar_id":"","url":"https://api.github.com/users/R4PaSs","html_url":"https://github.com/R4PaSs","followers_url":"https://api.github.com/users/R4PaSs/followers","following_url":"https://api.github.com/users/R4PaSs/following{/other_user}","gists_url":"https://api.github.com/users/R4PaSs/gists{/gist_id}","starred_url":"https://api.github.com/users/R4PaSs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/R4PaSs/subscriptions","organizations_url":"https://api.github.com/users/R4PaSs/orgs","repos_url":"https://api.github.com/users/R4PaSs/repos","events_url":"https://api.github.com/users/R4PaSs/events{/privacy}","received_events_url":"https://api.github.com/users/R4PaSs/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/privat/nit/labels/bug","name":"bug","color":"eb6420"}],"state":"closed","locked":false,"assignee":{"login":"privat","id":135828,"avatar_url":"https://avatars.githubusercontent.com/u/135828?v=3","gravatar_id":"","url":"https://api.github.com/users/privat","html_url":"https://github.com/privat","followers_url":"https://api.github.com/users/privat/followers","following_url":"https://api.github.com/users/privat/following{/other_user}","gists_url":"https://api.github.com/users/privat/gists{/gist_id}","starred_url":"https://api.github.com/users/privat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/privat/subscriptions","organizations_url":"https://api.github.com/users/privat/orgs","repos_url":"https://api.github.com/users/privat/repos","events_url":"https://api.github.com/users/privat/events{/privacy}","received_events_url":"https://api.github.com/users/privat/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-06-04T17:31:08Z","updated_at":"2015-06-30T18:25:44Z","closed_at":"2015-06-30T18:25:44Z","body":"Hi, it seems there's a little bug in the adaptative type system.\r\n\r\nI have this sample code:\r\n\r\n~~~nit\r\nclass A\r\nend\r\n\r\nclass B\r\n        super A\r\nend\r\n\r\nclass C\r\n        super A\r\nend\r\n\r\nclass E\r\n        super B\r\n\r\n        var c: A\r\nend\r\n\r\nclass D\r\n        fun foo(s: B) do\r\n                var c: A = s\r\n                if not c isa E then abort\r\n                loop\r\n                        if c isa C then return\r\n                        if not c isa E then abort\r\n                        c = c.c\r\n                end\r\n        end\r\nend\r\n~~~\r\n\r\nWhen trying to compile, I get this warning: `Warning: expression is already a `E`. (useless-type-test)`\r\n\r\nI thought, oh well fine, wow adaptative typing is so intelligent it could figure that `c` could only be a E since it was not a C, how beautiful.\r\n\r\nBut, I was wrong.\r\n\r\nWhen I remove the type test, here's what I get: `Error: method c does not exists in A`\r\n\r\nHm, damn. This is embarassing."}}