Skip to content

Commit cebbe04

Browse files
sjoelundOpenModelica-Hudson
authored andcommitted
Fix #3380: Handle save() for short class definitions
1 parent 57a269e commit cebbe04

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

Compiler/FrontEnd/ModelicaBuiltin.mo

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1850,10 +1850,9 @@ external "builtin";
18501850
annotation(preferredView="text");
18511851
end mkdir;
18521852

1853-
function remove "removes a file or directory of given path (which may be either relative or absolute)
1854-
returns 0 if path was removed successfully."
1855-
input String newDirectory;
1856-
output Boolean success;
1853+
function remove "removes a file or directory of given path (which may be either relative or absolute)."
1854+
input String path;
1855+
output Boolean success "Returns true on success.";
18571856
external "builtin";
18581857
annotation(preferredView="text");
18591858
end remove;

Compiler/Script/Interactive.mo

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15699,6 +15699,8 @@ algorithm
1569915699
parts2 = replacePublicList(parts, publst2);
1570015700
then
1570115701
Absyn.CLASS(a,b,c,d,e,Absyn.CLASS_EXTENDS(baseClassName,modifications,cmt,parts2,ann),file_info);
15702+
// Short class definitions, etc
15703+
else inClass;
1570215704
end match;
1570315705
end removeInnerDiffFiledClass;
1570415706

Compiler/runtime/systemimpl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,7 @@ extern int SystemImpl__removeDirectory(const char *path)
10981098
}
10991099
}
11001100

1101-
return retval;
1101+
return retval==0;
11021102
}
11031103

11041104
extern char* SystemImpl__readFileNoNumeric(const char* filename)

0 commit comments

Comments
 (0)