(--------)
I think you are mixing different syntaxs see e.g. https://plantuml.com/activity-diagram-beta
So probably the following will be better for you:
@startuml start switch (whatever) case (first case) :foo; case (other case) :bar; endswitch stop @enduml
Thanks, I didn't notice that plantuml has 2 versions with different syntaxes