Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#1695 closed defect (fixed)

SCodeFlatten causes scripting API to stop working

Reported by: Martin Sjölund Owned by: Martin Sjölund
Priority: high Milestone: 1.9.0
Component: Command Prompt Environment Version:
Keywords: Cc: Martin Sjölund, Per Östlund

Description (last modified by Martin Sjölund)

loadString("
model N
  Integer Spring[:] = {1,2,3,4};
end N;

model M
  extends N(Spring[:] = {1,2,3});
end M;
");
getClassNames();getErrorString();
Compiler/FrontEnd/SCodeUtil.mo:        Error.addSourceMessage(Error.SUBSCRIPTED_MODIFIER, {}, info);

The above model is illegal according to SCodeFlatten, but the class should simply be invalidated. If we load this class, OMEdit, is now unable to delete or add classes, etc (getClassNames no longer returns a value).

Change History (2)

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

Component: Backend
Resolution: fixed
Status: newclosed

This was fixed by not inserting code that causes SCode to fail

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

Component: BackendCommand Prompt Environment
Description: modified (diff)
Milestone: 1.9.0
Note: See TracTickets for help on using tickets.