diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2018-01-29 10:46:57 +0100 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2018-01-29 10:48:45 +0100 |
| commit | e930c140b424e4f72c6317bedef4ab45079270c9 (patch) | |
| tree | 92cc0e8fb256ccd89fb52e0c1673ad501ef74eca | |
| parent | ad94bb45ba5e1d36a9dcee3ebe7a4d65241379de (diff) | |
Warn if a symbol/choice has multiple prompts
In a single location. Having multiple definitions with different prompts
is okay.
| -rw-r--r-- | kconfiglib.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kconfiglib.py b/kconfiglib.py index 2383fac..621e6c3 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -1740,6 +1740,10 @@ class Kconfig(object): node.item.orig_type = new_type if self._peek_token() is not None: + if prompt: + self._warn("{} defined with multiple prompts in single location" + .format(_name_and_loc_str(node.item))) + prompt = (self._expect_str(), self._parse_cond()) elif t0 == _T_DEPENDS: @@ -1831,6 +1835,10 @@ class Kconfig(object): # 'prompt' properties override each other within a single # definition of a symbol, but additional prompts can be added # by defining the symbol multiple times + if prompt: + self._warn("{} defined with multiple prompts in single location" + .format(_name_and_loc_str(node.item))) + prompt = (self._expect_str(), self._parse_cond()) elif t0 == _T_RANGE: |
