Skip to content

[dartdoc] Generics don't resolve in the analyzer. #55458

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

Open
kallentu opened this issue Apr 12, 2024 · 1 comment
Open

[dartdoc] Generics don't resolve in the analyzer. #55458

kallentu opened this issue Apr 12, 2024 · 1 comment
Labels
analyzer-api Issues that impact the public API of the analyzer package area-dart-model For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer. P4 type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@kallentu
Copy link
Member

As seen in the comment here flutter/flutter#146652 (comment).
The analyzer doesn't seem to create the proper references any type in square brackets with generics, like [List<int>].

Dartdoc's comment reference resolution currently does have this feature and we would want to make sure this is supported before moving over to @docImports, since that will use the analyzer's resolution of comment references.

cc. @srawlins @goderbauer

@kallentu kallentu added legacy-area-analyzer Use area-devexp instead. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Apr 12, 2024
@srawlins
Copy link
Member

I dunno about "bug"; it was never designed to parse comment references with angle brackets. I think the language spec used to even specify that references were one identifier in [] or two identifiers separated by .. But it's no longer in the spec, so we added support for three identifiers.

I'd love to support type-argument-y things like [Map<String, List<int>>] and [void Function<T, S extends Future<T>>(S a)] and [(int record, {String type})].

See #47444 for other possible expansions (this is one of them).

@scheglov scheglov added the P4 label Apr 12, 2024
@srawlins srawlins added the analyzer-api Issues that impact the public API of the analyzer package label Aug 30, 2024
@johnniwinther johnniwinther added area-dart-model For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer. and removed legacy-area-analyzer Use area-devexp instead. labels Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-api Issues that impact the public API of the analyzer package area-dart-model For issues related to conformance to the language spec in the parser, compilers or the CLI analyzer. P4 type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

4 participants