Opened 15 years ago

Last modified 13 years ago

#1182 closed defect (fixed)

Multiple class definitions with the same name are possible

Reported by: AlexeyLebedev Owned by: AlexeyLebedev
Priority: high Milestone:
Component: Instantiation Version:
Keywords: Cc: AlexeyLebedev,

Description

It is possible to have multiple class definitions with the same name within the same scope without an error generated:
{{{model A

record T

Real r;

end T;
type T=Real;

end A;}}}
It is also possible to have one class definition in a scope and another inherited:
{{{model A

record T

Real r;

end T;

end A;

model B

extends A;
type T=Real;

end B;}}}

Change History (2)

comment:1 by Per Östlund, 14 years ago

The first example is no longer allowed by SCodeFlatten (+d=scodeFlatten), so it will be fixed when SCodeFlatten is turned on by default.

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

ScodeFlatten is now used by default

Note: See TracTickets for help on using tickets.