do not double evaluate dependent single variaibles
This commit is contained in:
parent
44705b622b
commit
356f278be9
1 changed files with 5 additions and 4 deletions
|
|
@ -737,15 +737,16 @@ class Script:
|
|||
|
||||
for variable in list(to_partially_resolve):
|
||||
definition = unresolved[variable]
|
||||
|
||||
maybe_resolved = definition
|
||||
|
||||
if isinstance(definition, Variable) and definition.name not in unresolvable:
|
||||
if definition in resolved:
|
||||
maybe_resolved = resolved[definition]
|
||||
elif definition in unresolved:
|
||||
maybe_resolved = unresolved[definition]
|
||||
else:
|
||||
raise UNREACHABLE
|
||||
# If it's not in resolved, it must be in unresolved.
|
||||
# Do not modify the definition, this avoids duplicate work because it will
|
||||
# wait for the single dependent variable to be resolved.
|
||||
assert definition in unresolved
|
||||
elif isinstance(definition, VariableDependency):
|
||||
maybe_resolved = definition.partial_resolve(
|
||||
resolved_variables=resolved,
|
||||
|
|
|
|||
Loading…
Reference in a new issue