Opened 10 years ago

Closed 10 years ago

#2877 closed defect (fixed)

saveTotalSCode with +showAnnotations generates bad file

Reported by: Adrian Pop Owned by: somebody
Priority: high Milestone: 1.9.1
Component: Frontend Version: trunk
Keywords: Cc:

Description

Just try omc +showAnnotations on this:

loadModel(Modelica); getErrorString();
saveTotalSCode(Modelica.Fluid.Examples.Tanks.ThreeTanks); getErrorString();

There are several errors:

  1. the comment in the last class is placed badly
  2. the quotes inside comments are not escaped in some cases

Also, while i'm at it: having top class M and doing saveTotalSCode on it will get you a new top class M extending from the top M which is invalid
Modelica code. We could check if name exists in the top scope and generate an unique one if so.

Change History (1)

comment:1 by Adrian Pop, 10 years ago

Milestone: Future1.9.1
Resolution: fixed
Status: newclosed

Fixed in r22808.

Note: See TracTickets for help on using tickets.