-
Notifications
You must be signed in to change notification settings - Fork 1.1k
TASTY: no way to access type constructor of an AppliedType
and explore its argument variance
#8520
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
Comments
@nicolasstucki could you check this issue please? |
@smarter how would we do this properly within the compiler? |
@nicolasstucki If I have a symbol for (If I want the variance of the parameter of |
As for #8514, big 👍 on this from me and other ZIO contributors / users eager to fully utilize the new environment encoding on Scala 3. |
Fix #8520: Add Reflection.Symbol.typeMembers
This is another problem which blocks
izumi-reflect
reimplementation for Dotty.Let's assume that we have the following definitions:
Having
AppliedType
forA[X[Int]]
I need to be able to access it's type constructor, enumerate parameters and obtain variance flags. Essentially I need to get something likeList(TypeParameter(F, Covariant))
So far I've found the only (insane) way to access something which looks like a type constructor:
Though this way I cannot extract type parameter declarations - all the values returned by
typeParams
are instances ofTypeBounds
with no variance information attached.See also: 7mind/dotty-typetag-research#2
The text was updated successfully, but these errors were encountered: