Skip to content

aliasElement not populated on non-function typedef references #45291

@jcollins-g

Description

@jcollins-g

@scheglov

Given the following code:

typedef T0 = void;
typedef T1 = Function;
typedef T2<X> = List<X>;
typedef T3<X, Y> = Map<X, Y>;
typedef T4 = void Function();

T0 a;

class C2 {
  T0 b;
  T1 c;
  T2 d(T3 e, T4 f);
}

DartTypes generated for a, b, c, d, and e do not appear to have populated fields for aliasElement/aliasArguments. Only f has these fields populated. I have gone over how dartdoc is finding these, and just looking at the most basic level of inspecting element.type I do not see the fields populated even with the experiment on. For example:

Screen Shot 2021-03-11 at 2 03 38 PM

Without this Dartdoc is unable to reconnect the types to their aliases, which leads to lower quality documentation.

Metadata

Metadata

Assignees

Labels

P3A lower priority bug or feature requestanalyzer-apiIssues that impact the public API of the analyzer packagearea-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions