test index param

This commit is contained in:
Emmanuel Garette 2021-02-18 14:08:57 +01:00
parent 2e16bc2b90
commit 88f5b20aa9
4 changed files with 14 additions and 1 deletions

View file

@ -87,7 +87,7 @@ class ParamAnnotator:
elif param.type == 'index':
for target in obj.target:
if not self.objectspace.paths.is_follower(target.name.path):
msg = _(f'"{param.type}" parameter cannot be set with target "{target.name}"'
msg = _(f'"{param.type}" parameter cannot be set with target "{target.name.name}"'
f' which is not a follower variable')
raise DictConsistencyError(msg, 60, obj.xmlfiles)
pass

View file

@ -0,0 +1,13 @@
<?xml version='1.0' encoding='UTF-8'?>
<rougail>
<variables>
<variable name="my_variable"/>
</variables>
<constraints>
<fill name="calc_val">
<param type="index"/>
<target>my_variable</target>
</fill>
</constraints>
</rougail>