commit | f3daca2ef679ebaf952e677901bd8ec4bc027ab8 | [log] [tgz] |
---|---|---|
author | Nicholas Shahan <nshahan@google.com> | Fri Jul 01 18:29:10 2022 +0000 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Jul 01 18:29:10 2022 +0000 |
tree | feb732a8ffafd5ccf36f7cccb90b7241510a8c39 | |
parent | bc458d534194cab57173c19c57c03378fb9a1917 [diff] |
[ddc] Fix cast when retrieving annotation name Name can be null and cast failures start appearing here when running with sound null safety. Issue: https://github.com/dart-lang/sdk/issues/46617 Change-Id: I3d96e80283889915cc28a310a1db940a9c6bcab1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250409 Reviewed-by: Mark Zhou <markzipan@google.com> Commit-Queue: Nicholas Shahan <nshahan@google.com>
diff --git a/pkg/dev_compiler/lib/src/kernel/compiler.dart b/pkg/dev_compiler/lib/src/kernel/compiler.dart index 3bc7339..04deb4c 100644 --- a/pkg/dev_compiler/lib/src/kernel/compiler.dart +++ b/pkg/dev_compiler/lib/src/kernel/compiler.dart
@@ -6534,7 +6534,7 @@ String? _annotationName(NamedNode node, bool Function(Expression) test) { var annotation = findAnnotation(node, test); return annotation != null - ? _constants.getFieldValueFromAnnotation(annotation, 'name') as String + ? _constants.getFieldValueFromAnnotation(annotation, 'name') as String? : null; }