-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
DCA issue when traits are define in library and used in generic function #3671
Labels
compiler: frontend
Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
Comments
tritao
added
bug
Something isn't working
compiler: frontend
Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
labels
Jan 2, 2023
tritao
added a commit
to tritao/sway
that referenced
this issue
Jan 24, 2023
tritao
added a commit
to tritao/sway
that referenced
this issue
Feb 1, 2023
tritao
added a commit
to tritao/sway
that referenced
this issue
Feb 1, 2023
tritao
added a commit
to tritao/sway
that referenced
this issue
Feb 1, 2023
tritao
added a commit
to tritao/sway
that referenced
this issue
Feb 1, 2023
tritao
added a commit
to tritao/sway
that referenced
this issue
Feb 6, 2023
tritao
added a commit
to tritao/sway
that referenced
this issue
Feb 6, 2023
tritao
added a commit
that referenced
this issue
Feb 7, 2023
Closes #3671. There were a bunch of different fixes necessary to fix this one, which are separated into individual commits to make it easier to review. The main gist is that the DCA now keeps track of functions by their signature instead of just their name and when encountering monomorphized functions in the DCA engine, we now look for their counterpart fully generic version and link the two together. Previously: ![bug](https://user-images.githubusercontent.com/602268/216972881-65b9a7c3-083e-44ff-9a5b-cc310bb19146.png) Now: ![bug3](https://user-images.githubusercontent.com/602268/216972937-c6be0909-9349-4fd4-9d33-f9dcaca93767.png)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
compiler: frontend
Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
When traits are define in library and used in
main.sw
within a generic function we get aThis declaration is never used
for the trait implementation that is used.main.sw
traits.sw
The text was updated successfully, but these errors were encountered: