diff --git a/mesonbuild/ast/interpreter.py b/mesonbuild/ast/interpreter.py index 8c73cb160da2..243f0be9436f 100644 --- a/mesonbuild/ast/interpreter.py +++ b/mesonbuild/ast/interpreter.py @@ -35,6 +35,7 @@ IfClauseNode, IndexNode, MethodNode, + NotNode, OrNode, PlusAssignmentNode, StringNode, @@ -235,6 +236,10 @@ def evaluate_orstatement(self, cur: OrNode) -> bool: self.evaluate_statement(cur.right) return False + def evaluate_notstatement(self, cur: NotNode) -> bool: + self.evaluate_statement(cur.value) + return False + def evaluate_foreach(self, node: ForeachClauseNode) -> None: try: self.evaluate_codeblock(node.block) diff --git a/test cases/unit/57 introspection/meson.build b/test cases/unit/57 introspection/meson.build index a094a558c12f..9716eaeb7ab5 100644 --- a/test cases/unit/57 introspection/meson.build +++ b/test cases/unit/57 introspection/meson.build @@ -8,6 +8,7 @@ b1 = get_option('test_opt1') b2 = get_option('test_opt2') test_bool = b1 or b2 test_bool = b1 and b2 +test_bool = not test_bool set_variable('list_test_plusassign', []) list_test_plusassign += ['bugs everywhere']