New tests and bugs

Robert Field robert.field at oracle.com
Mon Feb 9 15:37:04 UTC 2015


On 02/09/15 06:32, andrei.eremeev wrote:
> Hi REPL team,
>
> Please, find new tests here: 
> http://cr.openjdk.java.net/~aeremeev/forward_reference.00/

Thanks.  Pushed.

>
> Found bugs: calling of unresolved method causes creation of temporary 
> variable
> -> int f() { return x; }
> |  Declared method f, however, it cannot be invoked until variable x 
> is declared
>
> -> f()
> |  Attempted to call f which cannot be invoked until variable x is 
> declared.
>
> -> /vars
> |    int $1 = 0

Added the following bug:

- Expression generates temp var even when it does not complete because 
of internal/exteral exception -- needs to be deleted

>
> Class redeclaration changes behavior of assign variable:
>   assertDeclare("class A { public String toString() { return \"old\"; 
> } }", Declared);
>   assertDeclare("A a = new A();", Declared);
>   assertExecute1("a;", "old");
>   assertDeclare("class A { public String toString() { return \"new\"; 
> } }", Replaced);
>   assertExecute1("a;", "old"); <-- Expected old, but found null.

The semantics have changed.  All updates are automatic to all 
dependencies.  "a" cannot hold a "old" A anymore.  This is the expected 
behavior.

>
>
> Andrei Eremeev

Thanks,
Robert



More information about the kulla-dev mailing list