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 generic interface implementation #588

Closed
Tracked by #1569
HosseinYousefi opened this issue Jul 21, 2023 · 0 comments · Fixed by #1635
Closed
Tracked by #1569

Support generic interface implementation #588

HosseinYousefi opened this issue Jul 21, 2023 · 0 comments · Fixed by #1635
Assignees
Labels

Comments

@HosseinYousefi
Copy link
Member

There are some complex examples where this doesn't work in the experimental version of interface implementation. Such as

interface I<T> {
  T foo(List<T> bar);
}

Because storing the type parameter loses the original type and reconstructing List from the stored type creates a JList<JObject> which is incorrect.

Also generic methods in interfaces need to expose JObjTypes for their type parameters:

interface I {
  <S> S foo(S bar);
}
// Should be exposed like:
$S Function<$S extends JObject>($S bar, {required JObjType<$S> S});
@HosseinYousefi HosseinYousefi added the lang-java Related to Java support label Jul 21, 2023
@HosseinYousefi HosseinYousefi transferred this issue from dart-archive/jnigen Nov 17, 2023
@HosseinYousefi HosseinYousefi moved this to Backlog in JNIgen tracker Apr 11, 2024
@HosseinYousefi HosseinYousefi self-assigned this Oct 4, 2024
@HosseinYousefi HosseinYousefi added this to the JNI / JNIgen 0.12.0 milestone Oct 4, 2024
@HosseinYousefi HosseinYousefi moved this from Backlog to Todo in JNIgen tracker Oct 4, 2024
@HosseinYousefi HosseinYousefi moved this from Todo to In Progress in JNIgen tracker Oct 4, 2024
@HosseinYousefi HosseinYousefi linked a pull request Oct 8, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from In Progress to Done in JNIgen tracker Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant