Opened 14 years ago

Last modified 14 years ago

#1303 closed defect (fixed)

Problem with types having the same name as the package

Reported by: Martin Sjölund Owned by: Martin Sjölund
Priority: high Milestone: Bootstrapping
Component: Version:
Keywords: Cc: Martin Sjölund, Martin Sjölund

Description

I don't have time to check this problem against the Modelica spec. If it's not allowed

Basically, we have types Env.Env, DAE.DAE, InstanceHierarchy.InstanceHierarchy. But the compiler disallows these.
So either we need to fix the type (or module) names. Or we allow this in the compiler (making Lookup even harder).

Disallowed:
{{{class A
A a;
end A;}}}

Allowed:
{{{class A
type A = Real;
A a;
end A;}}}

Change History (2)

comment:1 by Martin Sjölund, 14 years ago

{{{the oracle say is ok:
[2010-10-08 22:06 :02] Adrian Pop: Check of A:

Checking type A.A:
The model has 1 scalar unknowns and 0 scalar equations.
Check of A.A successful.

Local classes checked, checking A:
Check of A successful.}}}

So I guess we should fix OMC...

comment:2 by Martin Sjölund, 14 years ago

Fixed in r6323 with testcase mofiles/NotDependsRecursive.mo

Note: See TracTickets for help on using tickets.