Opened 4 years ago

Closed 3 years ago

#4872 closed defect (fixed)

Errors for superseded modifications

Reported by: Jesper Mattsson Owned by: Jesper Mattsson
Priority: major Milestone: Pending
Component: Modelica/FrontEnd Version: trunk
Keywords: Cc:


InstComponentDecl.collectErrors() contains:


This means that all modifications on it are error-checked, even if some of them are superseded by modifications further up. This is desirable in principle (at least for check mode), but can give e.g. array size errors if it is dependent on parameters that has also had their value superseded.

Simply commenting out that line gives multiple failures in the JUnit tests. A good way would probably be to allow the same kind of errors that are allowed in inactive if branches.


model Test
    model A
        parameter Integer n = 2;
        parameter Real x[n] = 1:n;
        parameter Real y = x[2];
    end A;
    A a(n = 1, y = 2);
end Test;

Change History (3)

comment:1 Changed 3 years ago by Jesper Mattsson

Summary: Errors for superseded modificationsErrors for superceded modifications

comment:2 Changed 3 years ago by Jesper Mattsson

Summary: Errors for superceded modificationsErrors for superseded modifications

comment:3 Changed 3 years ago by Jesper Mattsson

Resolution: fixed
Status: newclosed


Updated error checking of annotation to allow same errors as in inactive if branches also in superseded modifications.

Note: See TracTickets for help on using tickets.