{"action":"closed","issue":{"url":"https://api.github.com/repos/intellifactory/websharper/issues/818","repository_url":"https://api.github.com/repos/intellifactory/websharper","labels_url":"https://api.github.com/repos/intellifactory/websharper/issues/818/labels{/name}","comments_url":"https://api.github.com/repos/intellifactory/websharper/issues/818/comments","events_url":"https://api.github.com/repos/intellifactory/websharper/issues/818/events","html_url":"https://github.com/intellifactory/websharper/issues/818","id":264610583,"number":818,"title":"Signatures of interface implementations","user":{"login":"Jand42","id":3116993,"avatar_url":"https://avatars3.githubusercontent.com/u/3116993?v=4","gravatar_id":"","url":"https://api.github.com/users/Jand42","html_url":"https://github.com/Jand42","followers_url":"https://api.github.com/users/Jand42/followers","following_url":"https://api.github.com/users/Jand42/following{/other_user}","gists_url":"https://api.github.com/users/Jand42/gists{/gist_id}","starred_url":"https://api.github.com/users/Jand42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jand42/subscriptions","organizations_url":"https://api.github.com/users/Jand42/orgs","repos_url":"https://api.github.com/users/Jand42/repos","events_url":"https://api.github.com/users/Jand42/events{/privacy}","received_events_url":"https://api.github.com/users/Jand42/received_events","type":"User","site_admin":false},"labels":[{"id":715667396,"url":"https://api.github.com/repos/intellifactory/websharper/labels/typescript","name":"typescript","color":"0052cc","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-11T14:33:26Z","updated_at":"2017-10-11T18:37:45Z","closed_at":"2017-10-11T18:37:45Z","author_association":"OWNER","body":"Signatures on interface implementations needs to be resolved by substituting generics. This snippet:\r\n```fsharp\r\nmodule GenericTest\r\n\r\ntype Foo<'T> =\r\n    [<Name \"Foo\">]\r\n    abstract Foo: unit -> 'T\r\n\r\ntype Bar<'T, 'U> (u: 'U) =\r\n    interface Foo<'U> with\r\n        member this.Foo() = u\r\n```\r\ncurrently translates to\r\n```typescript\r\nexport namespace GenericTest {\r\n  export class Bar<T0, T1> extends WebSharper.Obj implements GenericTest.Foo<T1>\r\n  {\r\n    u: T1;\r\n    Foo(): T0 {\r\n      return this.u;\r\n    }\r\n    constructor(u?: T1) {\r\n      super();\r\n      this.u = u;\r\n    }\r\n  }\r\n  export interface Foo<T0> {\r\n    Foo(): T0\r\n  }\r\n}\r\n```\r\nThe signature of `Foo` in the class `Bar` is wrong, it needs to return type `T1`."}}
{"actor":{"display_login":"Jand42"}}