From 0358445b6e02c6adbc5edd841168f90a20430ce3 Mon Sep 17 00:00:00 2001 From: Daniel Mensinger Date: Sun, 20 Jun 2021 00:02:25 +0200 Subject: fix: dicts and list need _holderify for fallback --- mesonbuild/interpreterbase/interpreterbase.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mesonbuild') diff --git a/mesonbuild/interpreterbase/interpreterbase.py b/mesonbuild/interpreterbase/interpreterbase.py index 8ef13c9..3ea10f4 100644 --- a/mesonbuild/interpreterbase/interpreterbase.py +++ b/mesonbuild/interpreterbase/interpreterbase.py @@ -799,7 +799,7 @@ The result of this is undefined and will become a hard error in a future Meson r index = posargs[0] fallback = None if len(posargs) == 2: - fallback = posargs[1] + fallback = self._holderify(posargs[1]) elif len(posargs) > 2: m = 'Array method \'get()\' only takes two arguments: the ' \ 'index and an optional fallback value if the index is ' \ @@ -845,7 +845,7 @@ The result of this is undefined and will become a hard error in a future Meson r return obj[key] if len(posargs) == 2: - fallback = posargs[1] + fallback = self._holderify(posargs[1]) if isinstance(fallback, mparser.BaseNode): return self.evaluate_statement(fallback) return fallback -- cgit v1.1