{"action":"created","issue":{"url":"https://api.github.com/repos/Araq/Nim/issues/2686","labels_url":"https://api.github.com/repos/Araq/Nim/issues/2686/labels{/name}","comments_url":"https://api.github.com/repos/Araq/Nim/issues/2686/comments","events_url":"https://api.github.com/repos/Araq/Nim/issues/2686/events","html_url":"https://github.com/Araq/Nim/issues/2686","id":74894189,"number":2686,"title":"Dynamic dispatch doesn't work properly when types are generic","user":{"login":"adlertz","id":1022962,"avatar_url":"https://avatars.githubusercontent.com/u/1022962?v=3","gravatar_id":"","url":"https://api.github.com/users/adlertz","html_url":"https://github.com/adlertz","followers_url":"https://api.github.com/users/adlertz/followers","following_url":"https://api.github.com/users/adlertz/following{/other_user}","gists_url":"https://api.github.com/users/adlertz/gists{/gist_id}","starred_url":"https://api.github.com/users/adlertz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adlertz/subscriptions","organizations_url":"https://api.github.com/users/adlertz/orgs","repos_url":"https://api.github.com/users/adlertz/repos","events_url":"https://api.github.com/users/adlertz/events{/privacy}","received_events_url":"https://api.github.com/users/adlertz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Araq/Nim/labels/Documentation","name":"Documentation","color":"d4c5f9"},{"url":"https://api.github.com/repos/Araq/Nim/labels/Methods","name":"Methods","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-10T10:56:56Z","updated_at":"2015-05-12T10:48:45Z","closed_at":null,"body":"```nim\r\ntype X = object of RootObj\r\ntype Y[T] = object of X\r\n    op*: T\r\ntype Z = object of X\r\n    op*: int\r\n\r\nproc newY[T](op: T): ref Y[T] =\r\n    new(result)\r\n    result.op = op\r\n\r\nproc newZ(op: int): ref Z =\r\n    new(result)\r\n    result.op = op\r\n\r\nproc y(): ref X =\r\n    newY(6)\r\n\r\nproc z(): ref X =\r\n    newZ(5)\r\n\r\nmethod desc(i: ref X): string =\r\n    quit \"Must override\"\r\n\r\nmethod desc[T](i: ref Y[T]): string =\r\n    $i.op\r\n\r\nmethod desc(i: ref Z): string =\r\n    $i.op\r\n\r\nlet i1 = z()\r\nlet i2 = y()\r\necho i1.desc() # prints \"5\"\r\necho i2.desc() # exits with \"Must override\", should print \"6\"\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/Araq/Nim/issues/comments/101234558","html_url":"https://github.com/Araq/Nim/issues/2686#issuecomment-101234558","issue_url":"https://api.github.com/repos/Araq/Nim/issues/2686","id":101234558,"user":{"login":"adlertz","id":1022962,"avatar_url":"https://avatars.githubusercontent.com/u/1022962?v=3","gravatar_id":"","url":"https://api.github.com/users/adlertz","html_url":"https://github.com/adlertz","followers_url":"https://api.github.com/users/adlertz/followers","following_url":"https://api.github.com/users/adlertz/following{/other_user}","gists_url":"https://api.github.com/users/adlertz/gists{/gist_id}","starred_url":"https://api.github.com/users/adlertz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adlertz/subscriptions","organizations_url":"https://api.github.com/users/adlertz/orgs","repos_url":"https://api.github.com/users/adlertz/repos","events_url":"https://api.github.com/users/adlertz/events{/privacy}","received_events_url":"https://api.github.com/users/adlertz/received_events","type":"User","site_admin":false},"created_at":"2015-05-12T10:48:45Z","updated_at":"2015-05-12T10:48:45Z","body":"You mean this is the intended behaviour? "}}