Skip to content

Commit

Permalink
fix(ngcompiler): declare types to be X instead of XImpl
Browse files Browse the repository at this point in the history
See dart-lang/sdk#51783. There may be other occurences of the same
issue, but let's fix these for now.

Signed-off-by: Gavin Zhao <git@gzgz.dev>
  • Loading branch information
GZGavinZhao committed Apr 7, 2023
1 parent eca6af2 commit 51bd17b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ class CompileTypeMetadataVisitor

CompileTokenMetadata _annotationToToken(ElementAnnotationImpl annotation) {
String name;
final id = annotation.annotationAst.arguments!.arguments.first;
final Expression id = annotation.annotationAst.arguments!.arguments.first;
if (id is Identifier) {
if (id is PrefixedIdentifier) {
name = id.identifier.name;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class _NormalizedComponentVisitor extends RecursiveElementVisitor<void> {
// template parsing in a similar way to #1, but a user will look at the
// code and not see a problem potentially.
final annotationImpl = annotation as ElementAnnotationImpl;
for (final argument
for (final Expression argument
in annotationImpl.annotationAst.arguments!.arguments) {
if (argument is NamedExpression && argument.name.label.name == field) {
if (argument.expression is! ListLiteral) {
Expand Down Expand Up @@ -796,7 +796,7 @@ class _ComponentVisitor
.annotationAst
.arguments
?.arguments
.firstWhereOrNull((argument) =>
.firstWhereOrNull((Expression argument) =>
argument is NamedExpression &&
argument.name.label.name == 'template') as NamedExpression?;
if (templateExpression != null) {
Expand Down

0 comments on commit 51bd17b

Please sign in to comment.