@@ -504,7 +504,8 @@ class MatchExprTree extends PostOrderTree instanceof MatchExpr {
504504 override predicate succ ( AstNode pred , AstNode succ , Completion c ) {
505505 // Edge from the scrutinee to the first arm.
506506 last ( super .getExpr ( ) , pred , c ) and
507- first ( super .getArm ( 0 ) .getPat ( ) , succ )
507+ first ( super .getArm ( 0 ) .getPat ( ) , succ ) and
508+ completionIsNormal ( c )
508509 or
509510 // Edge from a failed match/guard in one arm to the beginning of the next arm.
510511 exists ( int i |
@@ -571,18 +572,12 @@ class RefExprTree extends StandardPostOrderTree instanceof RefExpr {
571572 override AstNode getChildNode ( int i ) { i = 0 and result = super .getExpr ( ) }
572573}
573574
574- class ReturnExprTree extends PostOrderTree instanceof ReturnExpr {
575- override predicate propagatesAbnormal ( AstNode child ) { child = super .getExpr ( ) }
576-
577- override predicate first ( AstNode node ) {
578- first ( super .getExpr ( ) , node )
579- or
580- not super .hasExpr ( ) and node = this
581- }
575+ class ReturnExprTree extends StandardPostOrderTree instanceof ReturnExpr {
576+ override AstNode getChildNode ( int i ) { i = 0 and result = super .getExpr ( ) }
577+ }
582578
583- override predicate succ ( AstNode pred , AstNode succ , Completion c ) {
584- last ( super .getExpr ( ) , pred , c ) and succ = this and completionIsNormal ( c )
585- }
579+ class TryExprTree extends StandardPostOrderTree instanceof TryExpr {
580+ override AstNode getChildNode ( int i ) { i = 0 and result = super .getExpr ( ) }
586581}
587582
588583class TupleExprTree extends StandardPostOrderTree instanceof TupleExpr {
0 commit comments