﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1025	Some of the reduction expressions do not work.	Adrian Pop	Adrian Pop	"{{{model foo
  Real x[2];
  Real y;
equation
  x={1,3};
  y=sum(x[i]^2 for i in 1:2);
end foo;}}}

This should compile and produce the desired result y=10. With omc, I get the following error: \\Type mismatch in equation y=<reduction>sum(x[1]2.0 for i in {1,2}) of type Real = Real[2]

I guess that reductions should be supported by the compiler, because of the diagnostic message mentioning them. However, there are bugs in there: sum is interpreted as a vector (it should be a scalar), and x[1] appears instead of x[i]. What's wrong here?

Cheers, \\Francesco"	defect	closed	critical				worksforme		Adrian Pop Adrian Pop
