-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
interpreterbase: Add disabler exception for
get_variable
method
Add an exception to the disabler check to allow objects with a `get_variable` method to not always pick a disabler if their arguments contain one. This mimics the behaviour already in place for calls to function, which has a set of excepted functions. Fixes #13717
- Loading branch information
Showing
3 changed files
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
test cases/common/280 subproject get_variable disabler/meson.build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# https://github.com/mesonbuild/meson/issues/13717 | ||
|
||
project('foo', 'c') | ||
|
||
bar_subproj = subproject('bar') | ||
bar_dep = bar_subproj.get_variable('bar_dep', disabler()) | ||
|
||
if is_disabler(bar_dep) | ||
error('bar_dep is a disabler') | ||
endif | ||
|
2 changes: 2 additions & 0 deletions
2
test cases/common/280 subproject get_variable disabler/subprojects/bar/meson.build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
project('bar', 'c') | ||
bar_dep = declare_dependency() |