Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Union doesn't handle mapped traits #1724

Open
corranwebster opened this issue Oct 14, 2022 · 0 comments
Open

Union doesn't handle mapped traits #1724

corranwebster opened this issue Oct 14, 2022 · 0 comments

Comments

@corranwebster
Copy link
Contributor

An issue we are currently seeing trying to remove Trait(...) and Either(...) from Chaco: when you have Union(..., FooTrait, ...) where FooTrait is a mapped trait, union does not carry over the mapping behaviour, where Trait(...) did (I have not checked exactly what it does). There may be a similar issue with post_setattr?

I'm not sure what the right fix is in this case: you could say that a Union with any mapped trait is a mapped trait, but what do you set into the trait for un-mapped values: the safest is probably just to pass the value through, but arguments could be made for None or Undefined or similar.

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

No branches or pull requests

1 participant