﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5064	Inline doesn't work properly	Adrian Pop	Lennart Ochel	"
The NF can flatten attached model: AdvancedNoise.Examples.VaryingDistribution
but the inline doesn't work properly, the nBuffer is not inlined or evaluated when inlined and ends up as an undefined in the code generation.

{{{#!mo
function AdvancedNoise.Sources.TimeBasedNoise.interpolation.interpolate ""Inline before index reduction"" ""Constant interpolation in a buffer of random values""
  input Real[:] buffer ""Buffer of random numbers"";
  input Real offset ""Offset from buffer start (0..size(buffer)-1"";
  input Real samplePeriod = 1.0 ""The sample period of the noise buffer"";
  output Real y ""Interpolated value at position offset"";
  protected Integer nBuffer = size(buffer, 1) ""Size of the buffer"";
algorithm
  y := buffer[if nBuffer == 1 then 1 else integer(offset) + 1];
end AdvancedNoise.Sources.TimeBasedNoise.interpolation.interpolate;
}}}

"	defect	new	high	Future	Backend				
