Skip to content

Extensions on nullable class are missing from generated docs #3907

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
loic-sharma opened this issue Oct 18, 2024 · 1 comment · Fixed by #3908
Closed

Extensions on nullable class are missing from generated docs #3907

loic-sharma opened this issue Oct 18, 2024 · 1 comment · Fixed by #3908
Assignees
Labels
P3 A lower priority bug or feature request type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@loic-sharma
Copy link

loic-sharma commented Oct 18, 2024

Summary

If an extension is on T?, dart doc will not include it on T’s API reference. Follow-up to #2021

Repro

See: https://github.com/loic-sharma/static_extension_on_nullable

Create a library with an extension methods on Widget and Widget?:

class Widget {}

extension NullableDecorators on Widget? {
  Widget padding() => Widget();
}

extension Decorators on Widget {
  Widget expanded() => Widget();
}

Expected result

dart doc includes both the .padding and .expanded extension methods on the Widget class.

Actual result

The .padding extension method is missing:

image

@loic-sharma loic-sharma changed the title Static extensions on nullable class are missing Extensions on nullable class are missing from generated docs Oct 19, 2024
@srawlins srawlins self-assigned this Oct 21, 2024
@srawlins srawlins added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) P3 A lower priority bug or feature request labels Oct 21, 2024
@srawlins
Copy link
Member

Good catch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 A lower priority bug or feature request type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants