-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
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:
On typedefs:
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

