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

☂️ Support Wildcards (in generics) #701

Open
1 of 4 tasks
HosseinYousefi opened this issue Nov 18, 2022 · 2 comments
Open
1 of 4 tasks

☂️ Support Wildcards (in generics) #701

HosseinYousefi opened this issue Nov 18, 2022 · 2 comments

Comments

@mahesh-hegde
Copy link
Contributor

mahesh-hegde commented Mar 23, 2023

Related Generics issues:

#705
#704
#693
#713

It might be better to map the JLS generics to Dart generics upfront for once, in form of a specification.

@mahesh-hegde
Copy link
Contributor

mahesh-hegde commented Aug 13, 2023

I face this problem when implementing parsing of wildcard in asm (TypeUsageSignatureVisitor)1. So I am looking for a way to solve this if possible.

What are our options here?

  1. ? extends QualifiedName will map to QualifiedName and ? super QualifiedName will map to Object. This is probably easiest to implement, and with current implementation of TypeSignatureVisitor in summarizer, this is what happens anyway.

  2. ? extends QualifiedName will create a new type variable W1 extends QualifiedName. ? super QualifiedName is still Object.

I need to study the generics spec, especially the covariance part, but I would like to listen from those who already have. :)

Footnotes

  1. Map<K, V> uses many ? extends K kind of stuff. Previously +K would get parsed as K but if we want to parse it as ? extends K, we should handle Kind.WILDCARD properly in the generator.

@HosseinYousefi HosseinYousefi transferred this issue from dart-archive/jnigen Nov 17, 2023
@HosseinYousefi HosseinYousefi changed the title Support Wildcards (in generics) ☂️ Support Wildcards (in generics) May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

2 participants