Skip to content

Fix ASTNode's copyNode for constants. - #485

Open
luciansmith wants to merge 2 commits into
developmentfrom
fix-ast-copyNode
Open

Fix ASTNode's copyNode for constants.#485
luciansmith wants to merge 2 commits into
developmentfrom
fix-ast-copyNode

Conversation

@luciansmith

Copy link
Copy Markdown
Member

This bug showed up when using the FunctionDefinitionConverter on SBML Test Suite models. (Tests added.)

We weren't replacing 'name' with NULL, so the old name persisted.  Discovered when using the function definition converter on SBML Test Suite models.

@skeating skeating left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me

@fbergmann

Copy link
Copy Markdown
Member

@luciansmith while i agree, that the name ought to be set. I just wonder, whether copyNode should not copy the 'name' from source. is it not the case, that an application could use other than those names for the constant types?

@luciansmith

Copy link
Copy Markdown
Member Author

Oh! You remembered better than I; I had forgotten that the 'name' of a constant could also be set. I'll make the change.

A predefined constant in libsbml can have its own name set, in case someone wants alternate text for the node.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants