AttributeError: 'Dummy' object has no attribute 'type_'
This issue has occurred after solving issue https://git.scc.kit.edu/virtmat-tools/vre-language/-/issues/53.
This example (obviously not in the tests)
sqr(x) = x*x
z_minus_sqr(q, r) = 2*sqr(-1*q+r)
print(z_minus_sqr(2, 4.))
raises AttributeError: 'Dummy' object has no attribute 'type_'
. But it works in this ordering
print(z_minus_sqr(2, 4.))
z_minus_sqr(q, r) = 2*sqr(-1*q+r)
This is due to the missing substitution done by children list of metamodel type VarReference
. After the fist subsitution (the first function call) ref
points to objects other than Variable
or Dummy
. This is why these objects are not catched in the second substitution (in the second function call).
There should be differentiation in the if statement between these cases.