Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 242ed77

Browse files
committed
Fix for FormalParameter without name.
R=brianwilkerson@google.com Change-Id: I9dd957a9a55aef444f1e82a094dbf600a57074b0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99732 Commit-Queue: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
1 parent 92dd370 commit 242ed77

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/analyzer/lib/src/summary2/linked_unit_context.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ class LinkedUnitContext {
431431
} else if (node is EnumConstantDeclaration) {
432432
return node.name.offset;
433433
} else if (node is FormalParameter) {
434-
return node.identifier.offset;
434+
return node.identifier?.offset ?? -1;
435435
} else if (node is MethodDeclaration) {
436436
return node.name.offset;
437437
} else if (node is NamedCompilationUnitMember) {

0 commit comments

Comments
 (0)