Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for NPE when no flow for 'if' statement.
FAILURE: typedef:(:<>(s{if [NoSuchMethodError: The method 'ifStatement_thenBegin' was called on null. Receiver: null Tried calling: ifStatement_thenBegin(Instance of 'SimpleIdentifierImpl'), #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:54:5) flutter#1 ResolverVisitor.visitIfStatement (package:analyzer/src/generated/resolver.dart:1556:26) flutter#2 IfStatementImpl.accept (package:analyzer/src/dart/ast/ast.dart:5705:49) flutter#3 NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:7611:20) flutter#4 BlockImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:1087:17) #5 ResolverVisitor.visitNode (package:analyzer/src/generated/resolver.dart:1743:10) flutter#6 UnifyingAstVisitor.visitBlock (package:analyzer/dart/ast/visitor.dart:3143:31) flutter#7 ScopedVisitor.visitBlock.<anonymous closure> (package:analyzer/src/generated/resolver.dart:2467:13) flutter#8 ScopedVisitor._withDeclaredLocals (package:analyzer/src/generated/resolver.dart:3061:8) flutter#9 ScopedVisitor.visitBlock (package:analyzer/src/generated/resolver.dart:2466:5) flutter#10 BlockImpl.accept (package:analyzer/src/dart/ast/ast.dart:1083:49) flutter#11 BlockFunctionBodyImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:1042:13) flutter#12 ResolverVisitor.visitNode (package:analyzer/src/generated/resolver.dart:1743:10) flutter#13 UnifyingAstVisitor.visitBlockFunctionBody (package:analyzer/dart/ast/visitor.dart:3146:55) flutter#14 ScopedVisitor.visitBlockFunctionBody (package:analyzer/src/generated/resolver.dart:2476:13) flutter#15 ResolverVisitor.visitBlockFunctionBody (package:analyzer/src/generated/resolver.dart:954:13) flutter#16 BlockFunctionBodyImpl.accept (package:analyzer/src/dart/ast/ast.dart:1038:49) flutter#17 FunctionExpressionImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:5010:12) flutter#18 FunctionExpressionResolver.resolve (package:analyzer/src/dart/resolver/function_expression_resolver.dart:65:10) flutter#19 ResolverVisitor.visitFunctionExpression (package:analyzer/src/generated/resolver.dart:1457:37) flutter#20 FunctionExpressionImpl.accept (package:analyzer/src/dart/ast/ast.dart:5004:49) #21 DefaultFormalParameterImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:3008:20) #22 ResolverVisitor.visitNode (package:analyzer/src/generated/resolver.dart:1743:10) #23 UnifyingAstVisitor.visitDefaultFormalParameter (package:analyzer/dart/ast/visitor.dart:3198:65) #24 ResolverVisitor.visitDefaultFormalParameter (package:analyzer/src/generated/resolver.dart:1239:11) #25 DefaultFormalParameterImpl.accept (package:analyzer/src/dart/ast/ast.dart:3003:15) #26 NodeListImpl.accept (package:analyzer/src/dart/ast/ast.dart:7611:20) #27 FormalParameterListImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:4493:17) #28 ResolverVisitor.visitNode (package:analyzer/src/generated/resolver.dart:1743:10) #29 UnifyingAstVisitor.visitFormalParameterList (package:analyzer/dart/ast/visitor.dart:3258:59) #30 ScopedVisitor.visitFormalParameterList (package:analyzer/src/generated/resolver.dart:2717:11) #31 FormalParameterListImpl.accept (package:analyzer/src/dart/ast/ast.dart:4489:49) #32 FunctionTypeAliasImpl.visitChildren (package:analyzer/src/dart/ast/ast.dart:5166:18) #33 ResolverVisitor.visitNode (package:analyzer/src/generated/resolver.dart:1743:10) #34 UnifyingAstVisitor.visitFunctionTypeAlias (package:analyzer/dart/ast/visitor.dart:3285:55) #35 ScopedVisitor.visitFunctionTypeAliasInScope (package:analyzer/src/generated/resolver.dart:2819:11) #36 ResolverVisitor.visitFunctionTypeAliasInScope (package:analyzer/src/generated/resolver.dart:1490:11) #37 ScopedVisitor.visitFunctionTypeAlias (package:analyzer/src/generated/resolver.dart:2812:7) #38 ResolverVisitor.visitFunctionTypeAlias (package:analyzer/src/generated/resolver.dart:1482:13) #39 FunctionTypeAliasImpl.accept (package:analyzer/src/dart/ast/ast.dart:5158:49) #40 ResolverVisitor.visitCompilationUnit (package:analyzer/src/generated/resolver.dart:1088:23) #41 CompilationUnitImpl.accept (package:analyzer/src/dart/ast/ast.dart:2134:49) #42 LibraryAnalyzer._resolveFile (package:analyzer/src/dart/analysis/library_analyzer.dart:706:10) [email protected] Change-Id: I72bf7219d55d0bf53beae11f977f8fb840dd8e2e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175908 Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]>
- Loading branch information