Migration: remove unnecessary constructor argument
Change-Id: Ic544c37070d6ac3b874dc1a34d1709cf0949ff70
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105441
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
diff --git a/pkg/nnbd_migration/lib/src/graph_builder.dart b/pkg/nnbd_migration/lib/src/graph_builder.dart
index 61c5623..85ef317 100644
--- a/pkg/nnbd_migration/lib/src/graph_builder.dart
+++ b/pkg/nnbd_migration/lib/src/graph_builder.dart
@@ -234,8 +234,8 @@
assert(_isSimple(thenType)); // TODO(paulberry)
var elseType = node.elseExpression.accept(this);
assert(_isSimple(elseType)); // TODO(paulberry)
- var overallType = DecoratedType(node.staticType,
- NullabilityNode.forLUB(node, thenType.node, elseType.node));
+ var overallType = DecoratedType(
+ node.staticType, NullabilityNode.forLUB(thenType.node, elseType.node));
_variables.recordDecoratedExpressionType(node, overallType);
return overallType;
}
diff --git a/pkg/nnbd_migration/lib/src/nullability_node.dart b/pkg/nnbd_migration/lib/src/nullability_node.dart
index 6e4336e..cec3eea 100644
--- a/pkg/nnbd_migration/lib/src/nullability_node.dart
+++ b/pkg/nnbd_migration/lib/src/nullability_node.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-import 'package:analyzer/dart/ast/ast.dart';
import 'package:meta/meta.dart';
/// Data structure to keep track of the relationship from one [NullabilityNode]
@@ -273,8 +272,8 @@
/// [joinNullabilities] callback. TODO(paulberry): this should become
/// unnecessary once constraint solving is performed directly using
/// [NullabilityNode] objects.
- factory NullabilityNode.forLUB(Expression conditionalExpression,
- NullabilityNode a, NullabilityNode b) = NullabilityNodeForLUB._;
+ factory NullabilityNode.forLUB(NullabilityNode a, NullabilityNode b) =
+ NullabilityNodeForLUB._;
/// Creates a [NullabilityNode] representing the nullability of a type
/// substitution where [outerNode] is the nullability node for the type
@@ -383,7 +382,7 @@
final NullabilityNode right;
- NullabilityNodeForLUB._(Expression expression, this.left, this.right);
+ NullabilityNodeForLUB._(this.left, this.right);
@override
Iterable<NullabilityNode> get _components => [left, right];