﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
6217	Allow checking models containing partial classes	Francesco Casella	Per Östlund	"If you check any model of the {{{Modelica.Fluid}}} library, which contains a partial medium package declaration, it fails with
{{{
[1] 11:55:14 Translation Error
[Modelica.Fluid.Interfaces: 571:7-572:53]: Medium is partial, name lookup is not allowed in partial classes.
}}}
This issue is reproduced by this MWE
{{{
package C
  model A
    B myB(redeclare package Medium = Modelica.Media.Air.MoistAir);
  end A;
  
  model B
    replaceable package Medium = Modelica.Media.Interfaces.PartialMedium;
    
    // The statement below is not valid, and leads to an error in checking the model B in OMEdit.
    parameter Modelica.SIunits.SpecificEnthalpy h_default = Medium.specificEnthalpy_pTX(
      p=Medium.p_default,
      T=Medium.T_default,
      X=Medium.X_default) ""Default enthalpy for the selected medium"";
  end B;
end C;
}}}
where {{{B}}} is checked successfully, but {{{A}}} fails check. Of course there is nothing wrong with {{{A}}}, it simply cannot be used unless the medium model is redeclared, but that doesn't make it invalid.

@perost, I'm not sure if you can fix this, or if @adrpo should take care of that, please report. Maybe we should introduce a separate API call that does (partial) instantiation for checking purposes and does not consider the constraint for simulation models."	defect	closed	blocker	1.17.0	New Instantiation		fixed		Adrian Pop Michael Wetter
