From 2cd86030a59095105b85b63eaa0f7dfbdcafe537 Mon Sep 17 00:00:00 2001 From: Paul Berry Date: Wed, 5 Jun 2019 14:24:20 +0000 Subject: [PATCH] Fix return value in GraphBuilder.visitVariableDeclaration. This method should return `null`, since it doesn't visit an expression. Change-Id: I018241c0d2e9b9f00bfe293352cf2707551c81e6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104881 Reviewed-by: Brian Wilkerson Commit-Queue: Paul Berry --- pkg/analysis_server/lib/src/nullability/graph_builder.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/analysis_server/lib/src/nullability/graph_builder.dart b/pkg/analysis_server/lib/src/nullability/graph_builder.dart index 7414beb11a82..a9801a9b32b8 100644 --- a/pkg/analysis_server/lib/src/nullability/graph_builder.dart +++ b/pkg/analysis_server/lib/src/nullability/graph_builder.dart @@ -472,8 +472,9 @@ class GraphBuilder extends GeneralizingAstVisitor { if (initializer == null) { throw UnimplementedError('TODO(paulberry)'); } else { - return _handleAssignment(destinationType, initializer); + _handleAssignment(destinationType, initializer); } + return null; } /// Creates the necessary constraint(s) for an assignment from [sourceType] to