Community
Participate
Working Groups
Generating the following programs gives warnings in generated java. program assign type BasicProgram {} myIntArray smallInt[][] { [ 1,2], [3,4,5], [6,7,8,9] } ; myStringArray string[][] = [ ["Duke", "Carolina"], ["Duke", "State", "Carolina"], ["Duke", "Carolina", "Mikey", "Misty"] ] ; myString string; function main() myString = myStringArray[3][3]; if (myString == "Mikey") sysLib.writeStdout(myString); end end end Type safety: The expression of type List needs unchecked conversion to conform to List<List<Short>> Type safety : A generic array of List<String> is created for a varargs parameter List is a raw type. References to generic type List<E> should be parameterized ArrayList is a raw type. References to generic type ArrayList<E> should be parameterized
This is normal and cannot be fixed.
Brian, is this OK with you? You didn't want warnings in the generated Java.
I discussed this with Tim, and he agrees that we should spend some time in the future to try and generate code that contains no warnings. Changing component to GenFramework since this covers all generators, and assigning to Future.
It's impossible to do this. The java compiler will even gives warnings on suppress warning statements that were not needed. My opinion is that this is a total waste of time.
*** This bug has been marked as a duplicate of bug 360845 ***