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

List literal compilation should specify the generic arguments #288

Open
2 tasks
MeAmAnUsername opened this issue Apr 11, 2022 · 0 comments
Open
2 tasks
Labels
Component: code generation Something that concerns the generated code Priority: medium Status: specified Enhancement that is ready to implement Type: bug Something isn't working

Comments

@MeAmAnUsername
Copy link
Owner

Summary
Code generation generates non-compiling Java code.

Todo

  • Add an e2e test
  • Fix code generation

Description
Given data Box[T] = foreign java Box {}, val xs: Box[int]* = [] generates final ArrayList<Box<Integer>> xs = new ArrayList <>(Arrays. asList( ));, which does not compile.

Implementation
It should explicitly add the generic arguments to asList: final ArrayList<Box<Integer>> xs = new ArrayList <>(Arrays. <Box<Integer>>asList( ));

Related issues

@MeAmAnUsername MeAmAnUsername added Type: bug Something isn't working Status: specified Enhancement that is ready to implement Component: code generation Something that concerns the generated code Priority: medium labels Apr 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: code generation Something that concerns the generated code Priority: medium Status: specified Enhancement that is ready to implement Type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant