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

Add support for dyn #296

Closed
W95Psp opened this issue Oct 20, 2023 · 0 comments · Fixed by #788
Closed

Add support for dyn #296

W95Psp opened this issue Oct 20, 2023 · 0 comments · Fixed by #788
Assignees
Labels
engine Issue in the engine P2 Medium priority

Comments

@W95Psp
Copy link
Collaborator

W95Psp commented Oct 20, 2023

From a dependent type perspective, a dyn can be seen as a dependent tuple.
Given a trait Foo, dyn Foo denotes an existentially quantified type: there exists a type that implements trait Foo.

Thus, an inhabitant of dyn Foo is simply a type T, a value of type T, and an impl of Foo for T. In other terms, dyn Foo is t: Type & t & foo t.

Note that Foo (and any trait, actually) should be implemented for such dependent tuples.

@W95Psp W95Psp added the engine Issue in the engine label Oct 20, 2023
@W95Psp W95Psp added the P2 Medium priority label Jan 2, 2024
@maximebuyse maximebuyse self-assigned this Jul 17, 2024
This was referenced Jul 18, 2024
github-merge-queue bot pushed a commit that referenced this issue Jul 18, 2024
@github-project-automation github-project-automation bot moved this to Done in hax Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine Issue in the engine P2 Medium priority
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants