Skip to content

Analyzer summaries do not encode inferred args for constant constructor invocations  #32290

@stereotype441

Description

@stereotype441

Consider the following code:

class C<T> {
  final T t;
  const C(this.t);
}
const Object x = const C(0);

Type inference infers that the constant constructor invocation is const C<int>(0). But this information is not recorded in the summary. Therefore, if x is reconstituted from a summary and constant evaluated, and the type of x's constant value is queried, the result will be C<dynamic>.

Metadata

Metadata

Assignees

Labels

P2A bug or feature request we're likely to work onarea-dart-modelFor issues related to conformance to the language spec in the parser, compilers or the CLI analyzer.customer-google3dart-model-analyzer-specIssues with the analyzer's implementation of the language spectype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions