﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1207	Iterator in for loop over enumeration has type Integer instead of EnumType	Per Östlund	Per Östlund	"If an enumeration is used as the range of a for loop then the iterator should be of the same type as the enumeration. The range is instead converted to an Integer range right now, which causes problems with for example the Integer function. See the following model:
{{{
model C  
  function find
    input  Integer index;
    output Real value;       
    algorithm
    for j in labels loop
      if index == Integer(j) then value := werte[i]; end if;
    end for;
  end find;

  type labels = enumeration (one ""1st"", two ""2nd"");
  constant Real[labels] values := {1.1, 2.2};
  Real valueTwo = find(Integer(labels.two));
end C;  
}}}"	defect	closed	high		Instantiation	1.6.0	fixed		Per Östlund
