diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-09-15 02:45:34 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-09-19 01:48:44 -0400 |
commit | 24ac3cdb9c403fa43553cece086666f48ece1b95 (patch) | |
tree | c378d6c307b0d4b9ad549d8fa816bff4594ecf56 /mesonbuild/interpreter | |
parent | 004575874ffdb77ee997f9c19e0a041d144994d6 (diff) | |
download | meson-24ac3cdb9c403fa43553cece086666f48ece1b95.zip meson-24ac3cdb9c403fa43553cece086666f48ece1b95.tar.gz meson-24ac3cdb9c403fa43553cece086666f48ece1b95.tar.bz2 |
declare_dependency: fix regression in printing the correct error
In commit 47426f3663f795ae9af59075297bf8215ae81f40 we migrated to
typed_kwargs, but the validator accepted a list and checked to see if it
was a single Dependency object.
Fixes #10813
Diffstat (limited to 'mesonbuild/interpreter')
-rw-r--r-- | mesonbuild/interpreter/type_checking.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesonbuild/interpreter/type_checking.py b/mesonbuild/interpreter/type_checking.py index 52c215c..80be85d 100644 --- a/mesonbuild/interpreter/type_checking.py +++ b/mesonbuild/interpreter/type_checking.py @@ -409,7 +409,7 @@ LINK_WITH_KW: KwargInfo[T.List[T.Union[BothLibraries, SharedLibrary, StaticLibra ContainerTypeInfo(list, (BothLibraries, SharedLibrary, StaticLibrary, CustomTarget, CustomTargetIndex, Jar, Executable, Dependency)), listify=True, default=[], - validator=lambda x: _link_with_error if isinstance(x, Dependency) else None, + validator=lambda x: _link_with_error if any(isinstance(i, Dependency) for i in x) else None, ) def link_whole_validator(values: T.List[T.Union[StaticLibrary, CustomTarget, CustomTargetIndex, Dependency]]) -> T.Optional[str]: |