Skip to content

Missing Comment in childEntries for some AnnotatedNodes #60423

Closed

Description

@FMorschel

Some time ago, I was working on #59724 and noticed something weird about extensions and typedefs not triggering comments suggestions. Today I found out what was actually wrong.

Although https://dart-review.googlesource.com/c/sdk/+/411380 makes some suggestions show up, it doesn't work well with PrefixedIdentifiers. The problem is that even though both are AnnotatedNodes, they never add the corresponding Comment on the childEntries.

See:

Variable:

Typedef:

This makes some completions work weirdly, see on classes:

Image

On typedefs:

Image

This is a problem because at DartCompletionManager.computeCandidateSuggestions we call CompilationUnitImpl.select, which uses AstNodeExtension.nodeCovering internally for identifying the node.

We should probably think of a smart test to guarantee that any new AnnotatedNode also contains Comment on the childEntries.

CC @bwilkerson

Activity

  1. added
    area-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.
    and removed on Mar 28, 2025
  2. FMorschel commented on Apr 1, 2025

    @FMorschel
    ContributorAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions