From 4b33c9cdb64f360c2ee19691baedfa4d0e32378f Mon Sep 17 00:00:00 2001 From: Volker Weißmann Date: Thu, 31 Jul 2025 16:52:35 +0200 Subject: rewriter: Accept UnknownValue() in more places Fixes #14840 --- test cases/unit/56 introspection/meson.build | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'test cases') diff --git a/test cases/unit/56 introspection/meson.build b/test cases/unit/56 introspection/meson.build index 568d5ccd7..c7856fe2e 100644 --- a/test cases/unit/56 introspection/meson.build +++ b/test cases/unit/56 introspection/meson.build @@ -58,6 +58,21 @@ test('test case 1', t1) test('test case 2', t2, depends: t3) benchmark('benchmark 1', t3, args: [cus1, cus2, cus3]) +### BEGIN: Stuff to test the handling of `UnknownValue` +var_1 = 1 +var_2 = 2 +unknown_var = 'var_1' +if host_machine.system() == 'windows' + unknown_var = 'var_2' +endif +# The IntrospectionInterpreter can't know the value of unknown_var and use the `UnknownValue` class. + +message(get_variable(unknown_var)) + +dependency(unknown_var, version: [unknown_var], required: false) +dependency(unknown_var, version: unknown_var, required: false) +### END: Stuff to test the handling of `UnknownValue` + ### Stuff to test the AST JSON printer foreach x : ['a', 'b', 'c'] if x == 'a' -- cgit v1.2.3