Skip to content

Commit 5e1589a

Browse files
sjoelundOpenModelica-Hudson
authored andcommitted
Make ParModelica String variables an error
1 parent bbc489c commit 5e1589a

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

Compiler/Template/CodegenCFunctions.tpl

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1948,17 +1948,7 @@ match var
19481948
* before set_memory_state. Strings are not known, so we copy them, etc...
19491949
*/
19501950
case var as VARIABLE(ty = T_STRING(__)) then
1951-
if not acceptMetaModelicaGrammar() then
1952-
// We need to strdup() all strings, then allocate them on the memory pool again, then free the temporary string
1953-
let &varCopy += 'String Variables not Allowed in ParModelica.'
1954-
let &varAssign +=
1955-
<<
1956-
String Variables not Allowed in ParModelica.
1957-
>>
1958-
""
1959-
else
1960-
let &varAssign += 'How did you get here??'
1961-
""
1951+
error(sourceInfo(), "String Variables not Allowed in ParModelica.")
19621952

19631953
case var as VARIABLE(parallelism = PARGLOBAL(__)) then
19641954
let instDimsInit = (instDims |> exp =>

0 commit comments

Comments
 (0)