You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "ARUNAVA SINHA (JIRA)" <ji...@apache.org> on 2018/04/17 16:25:00 UTC

[jira] [Updated] (NETBEANS-481) New ErrorRule to fix compiler error on initialization of var type variable with array

     [ https://issues.apache.org/jira/browse/NETBEANS-481?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ARUNAVA SINHA updated NETBEANS-481:
-----------------------------------
    Summary: New ErrorRule to fix compiler error on initialization of var type variable with array  (was: New ErrorRule to fix compiler error on initialization  of var type variable with literal array)

> New ErrorRule to fix compiler error on initialization of var type variable with array
> -------------------------------------------------------------------------------------
>
>                 Key: NETBEANS-481
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-481
>             Project: NetBeans
>          Issue Type: Improvement
>            Reporter: ARUNAVA SINHA
>            Assignee: ARUNAVA SINHA
>            Priority: Trivial
>              Labels: JDK10-LVTI
>
> Below statement throws compiler error.
> var arr = \{1,2};
> : error: cannot infer type for local variable var k = \{ 1 , 2 }; ^
> (array initializer needs an explicit target-type)
>  
> Proposed fix would be
> var arr = new int[] \{ 1, 2 };



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@netbeans.apache.org
For additional commands, e-mail: commits-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists