mintro: Fix set_variable plus assign bug (closes #5256)

pull/5261/head
Daniel Mensinger 6 years ago committed by Nirbheek Chauhan
parent eaed4aecbe
commit c04651fe24
  1. 1
      mesonbuild/ast/interpreter.py
  2. 3
      test cases/unit/55 introspection/meson.build

@ -171,6 +171,7 @@ class AstInterpreter(interpreterbase.InterpreterBase):
assert(isinstance(node, mparser.PlusAssignmentNode))
if node.var_name not in self.assignments:
self.assignments[node.var_name] = []
self.assign_vals[node.var_name] = []
self.assignments[node.var_name] += [node.value] # Save a reference to the value node
if hasattr(node.value, 'ast_id'):
self.reverse_assignment[node.value.ast_id] = node

@ -9,6 +9,9 @@ b2 = get_option('test_opt2')
test_bool = b1 or b2
test_bool = b1 and b2
set_variable('list_test_plusassign', [])
list_test_plusassign += ['bugs everywhere']
if false
dependency('somethingthatdoesnotexist', required: true)
dependency('look_i_have_a_fallback', fallback: ['oh_no', 'the_subproject_does_not_exist'])

Loading…
Cancel
Save