Bug fix (by Olivier B.) fixing a previous bug, where the storage for constants

was being copied, but not the value itself
上级 89c0fd7a
...@@ -397,8 +397,9 @@ class Method(Component): ...@@ -397,8 +397,9 @@ class Method(Component):
if input not in _inputs: if input not in _inputs:
# Add this input to the inputs; we require that storage already exists for them, # Add this input to the inputs; we require that storage already exists for them,
# but otherwise they are immutable. # but otherwise they are immutable.
if isinstance(input, gof.Value): if isinstance(input, gof.Value): # and not isinstance(input, gof.Constant):
storage = get_storage(input) storage = get_storage(input)
storage.value = input.data
else: else:
storage = get_storage(input, not allocate_all) storage = get_storage(input, not allocate_all)
inputs.append(storage) inputs.append(storage)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论