CFG: Fix bug in LogicalNotTree

This commit is contained in:
Tom Hvitved
2021-01-18 15:03:58 +01:00
parent 3f31775252
commit 34fe416a85
2 changed files with 4 additions and 18 deletions

View File

@@ -782,12 +782,8 @@ module Trees {
final override predicate succ(AstNode pred, AstNode succ, Completion c) {
succ = this and
(
last(operand, pred, c.(BooleanCompletion).getDual())
or
last(operand, pred, c) and
c instanceof SimpleCompletion
)
last(operand, pred, c) and
c instanceof NormalCompletion
}
}

View File

@@ -2479,21 +2479,11 @@ ifs.rb:
# 41| If
#-----| -> exit constant_condition (normal)
# 41| Unary
# 41| [false] Unary
#-----| false -> If
#-----| true -> puts
# 41| true
#-----| false -> Unary
# 42| Call
#-----| -> If
# 42| puts
#-----| -> String
# 42| String
#-----| -> Call
#-----| true -> [false] Unary
loops.rb:
# 1| Method