Opened 14 years ago
Last modified 14 years ago
#1417 closed defect (fixed)
Lookup through extends does not reject invalid programs
Reported by: | Martin Sjölund | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Version: | ||
Keywords: | Cc: | Martin Sjölund, Per Östlund |
Description
{{{class B
class C
Integer i;
end C;
end B;
class C
Integer j;
end C;
class A
extends B;
extends C;
end A;}}}
Results in:
{{{class A
Integer j;
end A;}}}
"The lookup of the names of extended classes should give the same result before and after flattening the extends-
clauses". -- Modelica 3.2
This means the program should actually be rejected (lookup of C in scope A results in .C before extends and .A.C after extends).
Note:
See TracTickets
for help on using tickets.
This has been fixed in revision 7830, but in the SCodeFlatten module which is not yet used by default. I have added a test case (mofiles/InvalidExtends1.mo) to the FAILINGTESTS list, which will be moved to the normal tests when SCodeFlatten is enabled by default.