proofit404 / stories

Service objects designed with OOP in mind.
https://proofit404.github.io/stories/
BSD 2-Clause "Simplified" License
297 stars 21 forks source link

State union should fail on Variable normalization conflict. #690

Closed proofit404 closed 1 year ago

proofit404 commented 3 years ago
class A1State(State):
    v1 = Variable(is_integer)

class A2State(State):
    v1 = Variable(is_float)

NewState = A1State & A2State

The v1 variable in the NewState would fail on assignment. It can't be integer and float at the same time.

Checks:

proofit404 commented 1 year ago

Superseded by #722