﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
2029	Incorrect cyclically dependent error, inheritance issue (from MathCore)	mikaelf@…	probably noone	"Problem with inheritance which induces a cyclically dependent constants or parameters error, if however the partial models are included in the model the example works.

{{{
package TestCyclic
  model TestModel ""Fails to flatten""
    extends TestCyclic.Internal.SetDefinition;
    TestCyclic.FlexModel flexModel1(doSomething = doMoreSpecific);
  end TestModel;
  model FlexModel
    extends TestCyclic.Internal.Base;
    TestCyclic.Internal.Shape shape1 if doMoreSpecific;
  end FlexModel;
  package Internal
    partial model SetDefinition
      parameter Boolean doSomething = true;
      final parameter Boolean doMoreSpecific = doSomething and true and true;
    end SetDefinition;
    model Base
      extends TestCyclic.Internal.SetDefinition;
      TestCyclic.Internal.NullShape nullShape1 if not doMoreSpecific;
    end Base;
    model Shape
    end Shape;
    model NullShape
    end NullShape;
  end Internal;
}}}
Without extending partial models
{{{
  // Do the same w/o using extends, which works.
  model TestModel2 ""Works, includes the code which is extended in TestModel""
    parameter Boolean doSomething = true;
    final parameter Boolean doMoreSpecific = doSomething and true and true;
    TestCyclic.FlexModel2 flexModel1(doSomething = doMoreSpecific);
  end TestModel2;
  model FlexModel2 ""Includes the code which is extended in FlexModel""
    parameter Boolean doSomething = true;
    final parameter Boolean doMoreSpecific = doSomething and true and true;
    TestCyclic.Internal.NullShape nullShape1 if not doMoreSpecific;
    TestCyclic.Internal.Shape shape1 if doMoreSpecific;
  end FlexModel2;
end TestCyclic;
}}}"	defect	closed	high	1.16.0	New Instantiation	trunk	fixed		
