﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2025	Look-up failed for replaceable functions.	mikaelf@…	somebody	"Flattening of the ErrorTest? model in the following code fails due to look-up failure for the replaceable functions.

{{{
package Test
  model ErrorTest
    inner replaceable Test.TestModel testModel;
  end ErrorTest;
  model TestModel
    extends Test.Base(redeclare final function someOffset = constantOffset(offset = offset), redeclare final function coefficient = someCoefficient(coef_fixed = coef));
  protected
    outer Modelica.Mechanics.MultiBody.World world;
    function constantOffset
      extends Test.offsetBase;
      input Modelica.SIunits.Distance offset = 0;
    algorithm
      someOffset:={0,offset,0};
    end constantOffset;
    function someCoefficient
      extends Test.coefficientBase;
      input Real coef_fixed = 1;
    algorithm
      coef:=coef_fixed;
    end someCoefficient;
  end TestModel;
  partial function coefficientBase
    output Real coef = 1;
  end coefficientBase;
  partial function offsetBase
    output Modelica.SIunits.Position someOffset[3] = zeros(3);
  end offsetBase;
  partial model Base
    replaceable function coefficient = Test.coefficientBase;
    replaceable function someOffset = Test.offsetBase;
  end Base;
end Test;
}}}

Error message:

{{{
[30] 14:26:27 Validation of model Test.ErrorTest
Error: [:0:0-0:0] Error occurred while flattening model Test.ErrorTest
Error: [<interactive>:13:7-13:49] Class Modelica.SIunits.Distance not found in scope Test.TestModel.constantOffset.
Error: [<interactive>:8:110-8:167] Modified element coefficient not found in class Base.
}}}

Corresponding MathCore ticket: #3951"	defect	closed	critical	1.9.0	Frontend	trunk	worksforme		
