Bug in multi-snippet declaration
Robert Field
robert.field at oracle.com
Fri Feb 27 02:25:50 UTC 2015
I have just pushed a clarification to the eval() spec --
/**
* Check for errors, if valid, evaluate the input. The input should be
* exactly one complete snippet of source code, that is, one
expression,
* statement, variable declaration, method declaration, class
declaration,
* or import.
* To break arbitrary input into individual complete snippets, use
* {@link SourceCodeAnalysis#analyzeCompletion(String)}.
On 02/25/15 07:38, andrei.eremeev wrote:
> Hi REPL team,
>
> Bug in multi-snippet declaration:
>
> getState().eval("class A {}\nclass B extends A {}");
> getState().classes().forEach(c -> System.out.println(c.name()));
>
> The second line prints only class A, while A and B must be printed.
>
> Andrei Eremeev
More information about the kulla-dev
mailing list