Skip to content

Extension methods should appear on extended type #2073

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Hixie opened this issue Nov 15, 2019 · 3 comments
Closed

Extension methods should appear on extended type #2073

Hixie opened this issue Nov 15, 2019 · 3 comments

Comments

@Hixie
Copy link
Contributor

Hixie commented Nov 15, 2019

It would be neat if specialized extensions appeared on the extended type as well. For example, consider dart:ffi's Pointer:

https://api.dartlang.org/stable/2.6.1/dart-ffi/Pointer-class.html

It doesn't list any extensions, but it would be useful for it to explicitly list DoublePointer et al. Currently there doesn't seem to be any way to discover those extensions.

In addition, it would be even better if it could actually list the extension members themselves. For example, Pointer could include the various value, operator [], etc, members that are defined on each extension.

@Hixie
Copy link
Contributor Author

Hixie commented Nov 15, 2019

#2021 suggests something similar.

@jcollins-g
Copy link
Contributor

The partial fix for #2021 that landed with #2053 does this. See:

https://api.dartlang.org/be/168069/dart-ffi/Pointer-class.html

@jcollins-g
Copy link
Contributor

Listing the extension members themselves will eventually come with a more complete fix for #2021, but NNBD is currently occupying my time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants