Skip to content

Shadowing time #1243

@modelica-trac-importer

Description

@modelica-trac-importer

Reported by perost on 13 Aug 2013 09:22 UTC
Is the built-in variable time allowed to be shadowed by another element? I.e. can you declare an element with the name time? The specification (3.6.7) only says that time is a built-in variable available in all models and blocks, which doesn't preclude declaring a local element with the name time. Allowing time to be shadowed causes some ambiguity though:

package P
  constant Real time = 1.0;

  model A
    Real x = time; // Which time is referenced here?
  end A;
end P;

Migrated-From: https://trac.modelica.org/Modelica/ticket/1243

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions