@@ -369,6 +369,8 @@ class WhileExprTree extends LoopingExprTree instanceof WhileExpr {
369
369
370
370
override predicate entry ( AstNode node ) { this .first ( node ) }
371
371
372
+ override predicate propagatesAbnormal ( AstNode child ) { child = super .getCondition ( ) }
373
+
372
374
override predicate first ( AstNode node ) { first ( super .getCondition ( ) , node ) }
373
375
374
376
private ConditionalCompletion conditionCompletion ( Completion c ) {
@@ -388,13 +390,6 @@ class WhileExprTree extends LoopingExprTree instanceof WhileExpr {
388
390
this .conditionCompletion ( c ) .failed ( ) and
389
391
succ = this
390
392
}
391
-
392
- override predicate last ( AstNode last , Completion c ) {
393
- super .last ( last , c )
394
- or
395
- last ( super .getCondition ( ) , last , c ) and
396
- not completionIsNormal ( c )
397
- }
398
393
}
399
394
400
395
class ForExprTree extends LoopingExprTree instanceof ForExpr {
@@ -404,6 +399,8 @@ class ForExprTree extends LoopingExprTree instanceof ForExpr {
404
399
405
400
override predicate entry ( AstNode n ) { first ( super .getPat ( ) , n ) }
406
401
402
+ override predicate propagatesAbnormal ( AstNode child ) { child = super .getIterable ( ) }
403
+
407
404
override predicate first ( AstNode node ) { first ( super .getIterable ( ) , node ) }
408
405
409
406
override predicate succ ( AstNode pred , AstNode succ , Completion c ) {
@@ -421,13 +418,6 @@ class ForExprTree extends LoopingExprTree instanceof ForExpr {
421
418
c .( MatchCompletion ) .failed ( ) and
422
419
succ = this
423
420
}
424
-
425
- override predicate last ( AstNode last , Completion c ) {
426
- super .last ( last , c )
427
- or
428
- last ( super .getIterable ( ) , last , c ) and
429
- not completionIsNormal ( c )
430
- }
431
421
}
432
422
433
423
// TODO: replace with expanded macro once the extractor supports it
0 commit comments