diff options
author | Jon Turney <jon.turney@dronecode.org.uk> | 2018-02-11 16:33:57 +0000 |
---|---|---|
committer | Jon Turney <jon.turney@dronecode.org.uk> | 2018-02-15 12:53:46 +0000 |
commit | 7297e9f7a3581d132b0bccc47da4435c7315c74b (patch) | |
tree | 982dffd45010bb3e90a73d6db1ccb29a82400f36 /mesonbuild | |
parent | f37692bedb6c6a68fe1a1b91722fcb0b809e9fde (diff) | |
download | meson-7297e9f7a3581d132b0bccc47da4435c7315c74b.zip meson-7297e9f7a3581d132b0bccc47da4435c7315c74b.tar.gz meson-7297e9f7a3581d132b0bccc47da4435c7315c74b.tar.bz2 |
Add source location to warning for comparing different types
Diffstat (limited to 'mesonbuild')
-rw-r--r-- | mesonbuild/interpreterbase.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/interpreterbase.py b/mesonbuild/interpreterbase.py index 2234e54..0539b14 100644 --- a/mesonbuild/interpreterbase.py +++ b/mesonbuild/interpreterbase.py @@ -283,8 +283,8 @@ class InterpreterBase: # different types, which will one day become an error. if not valid and (node.ctype == '==' or node.ctype == '!='): mlog.warning('''Trying to compare values of different types ({}, {}) using {}. -The result of this is undefined and will become a hard error -in a future Meson release.'''.format(type(val1).__name__, type(val2).__name__, node.ctype)) +The result of this is undefined and will become a hard error in a future Meson release.''' + .format(type(val1).__name__, type(val2).__name__, node.ctype), location=node) if node.ctype == '==': return val1 == val2 elif node.ctype == '!=': |