﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4059	Wrong detection of structual parameters for instances	Patrick Täuber	Patrick Täuber	"While flattening of the following model b is detected as structural parameter instead of bar.b:

{{{#!mo
package ParameterBug3
  model parameterBug3
    foo bar (b=true);
  equation
  end parameterBug3;
  
  model foo
    parameter Boolean b;
    Real x;
  equation
    if b then
      x = 1;
    else
      x = 2;
    end if;
  end foo;
end ParameterBug3;
}}}

-d=printStructuralParameters:
{{{
""Notification: The following structural parameters were evaluated in the front-end: b
}}}

The final attribute for bar.b is lost before the backend.
-d=dumpdaelow:
{{{
Known variables only depending on parameters and constants - globalKnownVars (1)
========================================
1: bar.b:PARAM()  = true  type: Boolean
}}}

Adding another variable b at top level leads to a final attribute for b which is wrong:
{{{#!mo
package ParameterBug3
  model parameterBug3
    parameter Boolean b = true;
    foo bar (b=true);
  equation
  end parameterBug3;
  
  model foo
    parameter Boolean b;
    Real x;
  equation
    if b then
      x = 1;
    else
      x = 2;
    end if;
  end foo;
end ParameterBug3;
}}}

-d=printStructuralParameters:
{{{
""Notification: The following structural parameters were evaluated in the front-end: b
}}}

The final attribute for bar.b is lost before the backend.
-d=dumpdaelow:
{{{
Known variables only depending on parameters and constants - globalKnownVars (2)
========================================
1: bar.b:PARAM()  = true  type: Boolean
2: b:PARAM(final = true )  = true  type: Boolean
}}}"	defect	closed	high	Future	Frontend		fixed	structural parameter	
