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

Implement type union/intersection for nested references #7139

Open
shans opened this issue Apr 27, 2021 · 0 comments
Open

Implement type union/intersection for nested references #7139

shans opened this issue Apr 27, 2021 · 0 comments

Comments

@shans
Copy link
Contributor

shans commented Apr 27, 2021

(from b/156983624)

schema intersection has been implemented so that reference fields will be dropped unless their contained types match exactly.

Probably this should be implemented by instead performing an intersection of their contained types.

e.g. Foo { ref: &Person { name, age } } intersect Foo { ref: &Person { name, height } } should result in Foo { ref: &Person { name } }

TS impl at https://github.com/PolymerLabs/arcs/blob/master/src/runtime/schema.ts#L158

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