Use of a component parameter as a value is currently not supported.
Use of a component parameter as a value is currently not supported.
The folowing CIF model generates this error:
group def A():
alg int var1 = 1;
alg int var2 = 2;
end
group def B(A a):
alg int x = a.var1;
alg int y = x + a.var2;
end
group def C(A a):
b: B(a);
end
a: A();
c: C(a);
While you could rewrite the model as follows, it becomes less clean (and less adaptable once the model of A
grows).
group def A():
alg int var1 = 1;
alg int var2 = 2;
end
group def B(alg int var1, var2):
alg int x = var1;
alg int y = x + var2;
end
group def C(A a):
b: B(a.var1, a.var2);
end
a: A();
c: C(a);