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

Methods for types with instantiated generics #280

Open
gavr123456789 opened this issue Sep 7, 2024 · 0 comments
Open

Methods for types with instantiated generics #280

gavr123456789 opened this issue Sep 7, 2024 · 0 comments

Comments

@gavr123456789
Copy link
Owner

Pair(List::T, List::T) forEach = []

this should work only for Pairs with the same generics

now u dont store types with instantiated generics as separated types so this is not possible

  1. if receiver type of method decl after resolving still contains unresolved generics(T, G) then store it somehow inside TypeDB

For example create a list of instantiated types inside type and store this type like Pair(List::T, List::T) not Pair(T, G) inside and search there

  1. store receivers of methods separatelly from types itself, and typecheck it this receiver the same as receeiver of this type
    such typecheck would be needed only for types with generics since they can be instanciated with different types
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