Bugs in JShellState#drop

Robert Field robert.field at oracle.com
Fri May 8 21:54:21 UTC 2015


That is theoretically possible, but a different thing than current 
corralling, which intercepts corralled methods at runtime. When signatures 
are undefined a stub runtime method cannot be defined.

-Robert



On May 8, 2015 12:10:04 PM Brian Goetz <brian.goetz at oracle.com> wrote:

> >> We will not support forward reference of methods or classes where the
> >> signature is undefined.  For a class, the signature includes the name,
> >> the extends, implements, generic signature, types/names of fields,
> >> name/parameter-type of methods/constructors.  What can have forward
> >> references is method bodies and field initializers. Note that we will
> >> attempt to corral classes whose signatures break after definition, but
> >> I'm not sure the level with which that can be achieved.  We the JEP
> >> for more detail on this.
>
> What are the considerations here?  The "bright line" I was hoping for is:
>
>   - If a declaration matches a syntactic production, but fails
> compilation, then it should be corraled.
>
> So
>
>    class C extends D { void foo() { moo(); } }
>
> should be corralled even if D or moo() don't exist, but
>
>    class C extends $(#$*# @{ void #$%()( }
>
> would just be treated as erroneous input.
>
>




More information about the kulla-dev mailing list