List literal compilation should specify the generic arguments #288
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
Summary
Code generation generates non-compiling Java code.
Todo
Description
Given
data Box[T] = foreign java Box {}
,val xs: Box[int]* = []
generatesfinal 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
The text was updated successfully, but these errors were encountered: