-
Notifications
You must be signed in to change notification settings - Fork 204
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
feat: Added type hierarchy support for arrays and slices #1957
Conversation
I'm working on an approach that I think can be better, only casting as needed and only in function calls |
This wouldn't be needed then if arrays were not subtypes of slices? Perhaps we should just remove that and make them distinct types. Separating their syntax as well. |
522feee
to
c539c2d
Compare
This PR can be used as a stopgap until #1963 is finalized |
I don't think we should merge PRs if they're only going to be used temporarily while we explore something else. Unless that other thing is quite a long time away and the stopgap would be both non-breaking and easy to remove. I'll work on #1963 today if getting this fixed quickly is important. |
The stopgap should be non-breaking and removing it should be as simple as removing the |
1f37820
to
e97da64
Compare
separated into this one and #1973 |
@jfecher and @sirasistant where did we leave off in regards to this PR? |
It was my impression this PR is no longer needed after #1963 was merged. Pinging @sirasistant for confirmation |
Not needed anymore after 1963, closing! |
Description
Problem*
Arrays are a subtype of slice and SSA & brillig gen wasn't handling that properly.
Summary*
This adds support for type hierarchy handling in defunctionalization and in brillig gen. Also fixes various bugs found along the way. The changes to support type hierarchy itself are contained so it should be easy to remove when we remove type hierarchy from the SSA. In the meanwhile, this PR should allow us to continue advancing in other tasks.
Documentation
This PR requires documentation updates when merged.
Additional Context
PR Checklist*
cargo fmt
on default settings.