Incorrect propagation of defined variables

0 votes
asked Sep 10, 2014 in Closed bug by albert (400 points)
recategorized Sep 12, 2014 by albert
When having the folowing code in one file:

@startuml
class ArrayList
!ifdef SHOW_METHODS
ArrayList : int size()
ArrayList : void clear()
!endif
@enduml

@startuml
!define SHOW_METHODS
class ArrayList
!ifdef SHOW_METHODS
ArrayList : int size()
ArrayList : void clear()
!endif
@enduml

@startuml
class ArrayList
!ifdef SHOW_METHODS
ArrayList : int size()
ArrayList : void clear()
!endif
@enduml

 

I would expect that the resulting first and third image would be identical, but the second and the third resulting image are identical. Looks like the define for SHOW_METHODS is propagated to the third image.

1 Answer

+1 vote
answered Sep 11, 2014 by plantuml (131,770 points)
Hello,

Thanks for the feedback : it's corrected in this beta

https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

This will be in next official release.

Regards,
commented Sep 12, 2014 by albert (400 points)
Thanks, works now.
(I would like to change the status from "bug" to "closed_bug" but, unfortunately, I don't see how I can do this).
commented Sep 12, 2014 by albert (400 points)
Found the possibility for status change, just edit the original question and change the category.
...