Skip to content

Commit

Permalink
fixed missing ability to copy all variables except arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
lausdahl committed Sep 19, 2024
1 parent a3e221c commit d114279
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -654,8 +654,7 @@ public void addTransferAs(String... names) {

@Override
public <Var extends VariableFmi2Api> Var copy(String name, Var variable) {
if (variable instanceof BooleanVariableFmi2Api || variable instanceof DoubleVariableFmi2Api || variable instanceof IntVariableFmi2Api ||
variable instanceof StringVariableFmi2Api) {
if (!(variable instanceof ArrayVariableFmi2Api) && variable instanceof VariableFmi2Api) {
String varName = builder.getNameGenerator().getName(name);
PStm variableDeclaration = newVariable(varName, variable.getType(), variable.getReferenceExp().clone());
add(variableDeclaration);
Expand Down

0 comments on commit d114279

Please sign in to comment.