ozgunozerk / state-shift

Macros for implementing Type-State-Pattern on your structs and methods
MIT License
206 stars 3 forks source link

🐞 [Bug]: Multiple invocations fail #16

Open jkneer opened 7 hours ago

jkneer commented 7 hours ago

What happened?

Trying to setup multiple typestate patterns fails because some defintions are repeated, i.e.:

'the name `sealed` is defined multiple times
`sealed` must be defined only once in the type namespace of this module

Expected behavior

No response

jkneer commented 7 hours ago

As a workaraound in some cases you could move the different typestate patterns into separate modules. But in this specific case I have a larger object implementation that has a type state and additionally a method with a builder pattern.