﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1039	Improved name lookup (from MathCore)	krsta	krsta	"Consider the following model:
{{{
model Model4
  connector C1
    Real x;
  end C1;
  model M1
    C1 c1;
    Real y;

  equation 
    c1.x=y;
  end M1;
  model M2
    C1 c1;

  equation 
    m1.y=time;
  end M2;
  M1 m1;
  M2 m2;

equation 
  connect(m1.c1,m2.c1);
  connect(m1.c1,m2.c1);
end Model4;
}}}

This model should not work as the equation in M2 refers to the variable m1.y, which should not be accessible from m2. However it works in MathModelica, while Dymola gives the following error message:

Check of Model4:
 
Error: Variables found in types or in global scope must be constant, but m1.y wasn't.
In class Model4.M2.
  Modelica Text: line 13
Used in component m2.
  Modelica Text: line 20
Errors found in:
m1.y = time
  Modelica Text: line 17
The model contained invalid expressions
Check aborted.
ERROR: 1 error was found"	defect	closed	critical				worksforme		krsta
