Bugs
andrei.eremeev
andrei.eremeev at oracle.com
Tue Feb 3 12:06:45 UTC 2015
And another thing.
Return is not allowed in the top-level declaration, but completion
analysis returns different values according whether a statement has braces.
if (os == null) return null; <- UNKNOWN
if (os == null) { return null; } <- COMPLETE
Is it correct behavior for this code?
Andrei Eremeev
On 02/03/2015 11:56 AM, andrei.eremeev wrote:
> Yes, thank you. The root cause of the problem is using labels in such
> way:
> a : { for (int i = 0; i < 10; ++i) { break a;} }
>
> Andrei Eremeev
>
> On 02/02/2015 08:21 PM, Jonathan Gibbons wrote:
>> On 02/02/2015 07:33 AM, andrei.eremeev wrote:
>>> Hi REPL team,
>>>
>>> New REPL bugs related to completion analysis:
>>> 1. assert true // Expected COMPLETE_WITH_SEMI, got COMPLETE.
>>>
>>> 2. switch (ch) case a: break; // Expected COMPLETE_WITH_SEMI, got
>>> UNKNOWN.
>>> "break" breaks the code.
>>
>> Andrei,
>>
>> Did you really mean what you typed in the example, with no '{' ?
>> Doesn't seem like COMPLETE_WITH_SEMI to me.
>>
>> -- Jon
>>
>>>
>>> 3. Statements without braces fail.
>>> for(Object o : a) a; // expected [COMPLETE] but found [UNKNOWN]
>>> As well as If constructions.
>>>
>>> 4. int path[], status: expected [COMPLETE_WITH_SEMI], but found
>>> [DEFINITELY_INCOMPLETE]
>>>
>>> Andrei Eremeev
>>
>
More information about the kulla-dev
mailing list