language icon indicating copy to clipboard operation
language copied to clipboard

No macro.TypeDeclarationImpl for `dynamic`

Open scheglov opened this issue 1 year ago • 5 comments

See https://github.com/dart-lang/sdk/issues/55696#issuecomment-2168347771

scheglov avatar Jun 14 '24 16:06 scheglov

How do we want to model dynamic here? Should it have its own special implementation DynamicDeclarationImpl? What about Never?

One idea could be to make TypeDeclarationImpl be instantiable (non-abstract), I don't think we would add any additional fields to it for these. Or, maybe we want a separate interface for these "special" types just to make the class hierarchy a little more logical?

jakemac53 avatar Jun 14 '24 17:06 jakemac53

These are special types, I would add DynamicTypeDeclarationImpl and NeverTypeDeclarationImpl.

scheglov avatar Jun 14 '24 20:06 scheglov

I think it's probably time to stop minor fixes / improvements to the current API? We have four large breaking changes ahead, we should focus on work that will stay more or less intact through those.

dave26199 avatar Jun 15 '24 07:06 dave26199

I would be fine with pausing feature work on the existing classes. I think this issue will be relevant though in the new model as well, so we should keep it in mind.

jakemac53 avatar Jun 17 '24 16:06 jakemac53

Yes, we can keep the issue for that. Thanks.

davidmorgan avatar Jun 27 '24 13:06 davidmorgan