aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2021-10-12 17:17:05 +0200
committerXavier Claessens <xclaesse@gmail.com>2021-10-12 12:44:33 -0400
commit220d5aa7ba76afef511e87aa6b67fcccc5f4071d (patch)
tree1b1c3a867b676a029ad6d1d9f619a6965c6b868d
parentace184fa4539af5e958b23239a65269b43a5cda7 (diff)
downloadmeson-220d5aa7ba76afef511e87aa6b67fcccc5f4071d.zip
meson-220d5aa7ba76afef511e87aa6b67fcccc5f4071d.tar.gz
meson-220d5aa7ba76afef511e87aa6b67fcccc5f4071d.tar.bz2
interpreter: Fix missing holder entry (fixes #9389)
-rw-r--r--mesonbuild/interpreter/interpreter.py2
-rw-r--r--test cases/common/188 dict/meson.build11
2 files changed, 13 insertions, 0 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py
index 9f2c705..ba6bf11 100644
--- a/mesonbuild/interpreter/interpreter.py
+++ b/mesonbuild/interpreter/interpreter.py
@@ -19,6 +19,7 @@ from .. import mlog
from .. import build
from .. import optinterpreter
from .. import compilers
+from .. import envconfig
from ..wrap import wrap, WrapMode
from .. import mesonlib
from ..mesonlib import MesonBugException, HoldableObject, FileMode, MachineChoice, OptionKey, listify, extract_as_list, has_path_sep
@@ -419,6 +420,7 @@ class Interpreter(InterpreterBase, HoldableObject):
compilers.RunResult: compilerOBJ.TryRunResultHolder,
dependencies.ExternalLibrary: OBJ.ExternalLibraryHolder,
coredata.UserFeatureOption: OBJ.FeatureOptionHolder,
+ envconfig.MachineInfo: OBJ.MachineHolder,
})
'''
diff --git a/test cases/common/188 dict/meson.build b/test cases/common/188 dict/meson.build
index dacf01d..2f4c4c9 100644
--- a/test cases/common/188 dict/meson.build
+++ b/test cases/common/188 dict/meson.build
@@ -69,3 +69,14 @@ assert(d[k2] == 2, 'Incorrect expression evaluation in dictionary key')
d = {'a' + 'b' : 1}
assert(d['a' + 'b'] == 1, 'Incorrect expression evaluation in dictionary key')
assert(d['ab'] == 1, 'Incorrect expression evaluation in dictionary key')
+
+# Complex types
+d = {
+ 'sanity': 1,
+ 'host': host_machine,
+ 'meson': meson,
+}
+
+assert(d['sanity'] == 1)
+assert(not is_disabler(d['meson']))
+assert(not is_disabler(d['host']))