Opened 8 years ago

Closed 8 years ago

#2877 closed defect (fixed)

saveTotalSCode with +showAnnotations generates bad file

Reported by: adrpo 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 Changed 8 years ago by adrpo

  • Milestone changed from Future to 1.9.1
  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r22808.

Note: See TracTickets for help on using tickets.