Skip to content

Commit

Permalink
negating boolval fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Wout4 committed Jul 3, 2023
1 parent 06f09c3 commit 6f20a91
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions cpmpy/expressions/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,7 @@ def value(self):
return self.args[0]

def __invert__(self):
self.args[0] = not self.args[0]
return self
return BoolVal(not self.args[0])

def __bool__(self):
"""Called to implement truth value testing and the built-in operation bool(), return stored value"""
Expand Down

0 comments on commit 6f20a91

Please sign in to comment.