application of type vars to generic class is not currently supported #227
Labels
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: M-Labs/nac3#227
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Based on https://github.com/m-labs/artiq/issues/1207
I am not sure why is there such a restriction. And what is application of typevar to generic class? Do you mean anything like
C[T]
whereT = TypeVar(...)
is not supported? @ychenfoYes, I think this is what I try to say by 'application of typevar to generic class'.
As for the restriction, this indeed should not be a limit here.. but if I am not mistaken, I remembered that the main reason is that I am not sure how
subst
can work with something like:where
C[V]
would actually be something likeC[K]
, where we need to create another fresh typevarK
on the fly whose range is the intersection ofT
andV
and whosevar_id
is fresh and cannot known by others and hence cannot be put in a var_map that can be used to furthersubst
thisC[K]
.. Or will the new commit fixing type var by fixing the var_id be able to somehow handle this?