RFR 8144903: JShell: determine incorrectly the type of the expression which is array type of captured type

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Thu Dec 10 10:32:17 UTC 2015



On 10/12/15 03:07, Robert Field wrote:
> public static Object $2;
>
> otherwise the generated code will break.
What do you mean by this? How is using Object breaking the generated 
code? Seems to me you have just widened the type of a variable storing 
an expression - that ought to work; the only problem here is user 
expectations: if the user is expecting to pass this to a method 
accepting a CharSequence he/she will be disappointed. But how big of a 
problem is this? And, as I pointed out elsewhere, no general solution 
exists for this.

Maurizio


More information about the kulla-dev mailing list