diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-08-30 15:03:29 -0400 |
---|---|---|
committer | Eli Schwartz <eschwartz@archlinux.org> | 2022-08-30 15:30:55 -0400 |
commit | 78bf1ec56e50ba7e1cd14240af5d34e706e976bd (patch) | |
tree | 75daa6cb50fc12b9d1e97d7b163501a8e700e257 /mesonbuild/compilers/compilers.py | |
parent | 2c1ac8ac1ddb532cf498cc97a5bb36d5a05b4094 (diff) | |
download | meson-78bf1ec56e50ba7e1cd14240af5d34e706e976bd.zip meson-78bf1ec56e50ba7e1cd14240af5d34e706e976bd.tar.gz meson-78bf1ec56e50ba7e1cd14240af5d34e706e976bd.tar.bz2 |
fix obscure crash on unbound variable
This can be triggered if someone tries to call a non-ID. The example
reproducer was:
```
if (var = dependency(...)).found()
```
This produced a traceback ending in
```
raise InvalidArguments(f'Variable "{object_name}" is not callable.')
UnboundLocalError: local variable 'object_name' referenced before assignment
```
After this commit, the error is reported as:
```
ERROR: AssignmentNode is not callable.
```
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
0 files changed, 0 insertions, 0 deletions