{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/language/issues/89","repository_url":"https://api.github.com/repos/dart-lang/language","labels_url":"https://api.github.com/repos/dart-lang/language/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/language/issues/89/comments","events_url":"https://api.github.com/repos/dart-lang/language/issues/89/events","html_url":"https://github.com/dart-lang/language/issues/89","id":378879580,"node_id":"MDU6SXNzdWUzNzg4Nzk1ODA=","number":89,"title":"Should typedefs be usable as classes (when their definition is a class)","user":{"login":"leafpetersen","id":8484504,"node_id":"MDQ6VXNlcjg0ODQ1MDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/8484504?v=4","gravatar_id":"","url":"https://api.github.com/users/leafpetersen","html_url":"https://github.com/leafpetersen","followers_url":"https://api.github.com/users/leafpetersen/followers","following_url":"https://api.github.com/users/leafpetersen/following{/other_user}","gists_url":"https://api.github.com/users/leafpetersen/gists{/gist_id}","starred_url":"https://api.github.com/users/leafpetersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leafpetersen/subscriptions","organizations_url":"https://api.github.com/users/leafpetersen/orgs","repos_url":"https://api.github.com/users/leafpetersen/repos","events_url":"https://api.github.com/users/leafpetersen/events{/privacy}","received_events_url":"https://api.github.com/users/leafpetersen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2018-11-08T19:20:47Z","updated_at":"2018-11-26T08:52:18Z","closed_at":null,"author_association":"MEMBER","body":"This issue is for discussion of the open questions around whether type names (see [proposal](https://github.com/dart-lang/language/issues/65)) introduced by generalized typedefs should be usable in contexts expecting class names when the RHS of the typedef is itself a class type.  For example:\r\n\r\n```dart\r\nclass A<T> {\r\n  static int staticMethod() => 3;\r\n  A.named();\r\n  A();\r\n}\r\n\r\ntypedef MyA = A<int>;\r\ntypedef MyGA<T> = A<T>;\r\n\r\nclass B extends MyA {} // Allowed?\r\nclass C implements MyA {} // Allowed?\r\nclass D extends Object with MyA {} // Allowed?\r\n\r\nvoid main() {\r\n  // Which (if any) of these should be valid?\r\n  new MyA();\r\n  new MyA.named();\r\n  MyA.staticMethod();\r\n\r\n  new MyGA<int>();\r\n  new MyGA<int>.named();\r\n  MyGA.staticMethod();\r\n}\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/dart-lang/language/issues/comments/441562113","html_url":"https://github.com/dart-lang/language/issues/89#issuecomment-441562113","issue_url":"https://api.github.com/repos/dart-lang/language/issues/89","id":441562113,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MTU2MjExMw==","user":{"login":"eernstg","id":9606994,"node_id":"MDQ6VXNlcjk2MDY5OTQ=","avatar_url":"https://avatars1.githubusercontent.com/u/9606994?v=4","gravatar_id":"","url":"https://api.github.com/users/eernstg","html_url":"https://github.com/eernstg","followers_url":"https://api.github.com/users/eernstg/followers","following_url":"https://api.github.com/users/eernstg/following{/other_user}","gists_url":"https://api.github.com/users/eernstg/gists{/gist_id}","starred_url":"https://api.github.com/users/eernstg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eernstg/subscriptions","organizations_url":"https://api.github.com/users/eernstg/orgs","repos_url":"https://api.github.com/users/eernstg/repos","events_url":"https://api.github.com/users/eernstg/events{/privacy}","received_events_url":"https://api.github.com/users/eernstg/received_events","type":"User","site_admin":false},"created_at":"2018-11-26T08:52:18Z","updated_at":"2018-11-26T08:52:18Z","author_association":"MEMBER","body":"[CL 81414](https://dart-review.googlesource.com/c/sdk/+/81414) was updated such that the rules are maximally permissive (in particular, it is allowed to invoke static methods using expressions like `F.myStaticMethod()`, even in the case where `F` denotes a non-generic type alias whose right hand side is a parameterized type `C<Some, Type, Arguments>`, in which case it means `C.myStaticMethod()`)."}}
{"actor":{"display_login":"eernstg"}}