﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2284	MultiBody Flattening	Christian Schubert	somebody	"Hi,

I have a model using Modelica.Mechanics.MultiBody.Frames.smallRotation which essentially reads like this
{{{
  function smallRotation
    input Real T[3,3];
    input Boolean withResidues=false;
    output Real phi[if withResidues then 6 else 3];
  algorithm
    phi := if withResidues then [...] else [...];
    annotation(Inline=true);
  end smallRotation;
}}}

where [...] is some expression of appropriate dimension.

When trying to simulate this model, omc reports
{{{
Error: Failed to elaborate expression: if withResidues then [...] else [...]
Error occurred while flattening model
}}}

Changing the expression to 
{{{
if false then [...] else [...]
}}}
circumvents the problem but is no real solution."	defect	closed	high	1.12.0	Frontend	trunk	worksforme	evaulating structural parameters	Adrian Pop Per Östlund Martin Sjölund Lennart Ochel
