Skip to content

Commit 0b81fac

Browse files
stereotype441Commit Queue
authored andcommitted
[analyzer] Remove workaround for old flow analysis bug.
The fix for dart-lang/language#1785 was released in Dart 2.15. The analyzer's pubspec currently requires SDK version 3.7. So the workaround is no longer needed. Bug: dart-lang/language#1785 Change-Id: Ia18ca2c42e709cf232b3fa2fafba8f3679bb7d70 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437780 Commit-Queue: Konstantin Shcheglov <[email protected]> Auto-Submit: Paul Berry <[email protected]> Reviewed-by: Konstantin Shcheglov <[email protected]>
1 parent dec3165 commit 0b81fac

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pkg/analyzer/lib/src/dart/resolver/function_expression_resolver.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ class FunctionExpressionResolver {
2424

2525
void resolve(FunctionExpressionImpl node, {required DartType contextType}) {
2626
var parent = node.parent;
27-
// Note: `isFunctionDeclaration` must have an explicit type to work around
28-
// https://github.com/dart-lang/language/issues/1785.
29-
bool isFunctionDeclaration = parent is FunctionDeclaration;
27+
var isFunctionDeclaration = parent is FunctionDeclaration;
3028
var body = node.body;
3129

3230
if (_resolver.flowAnalysis.flow != null && !isFunctionDeclaration) {

0 commit comments

Comments
 (0)