Bugs in JShellState#drop
Brian Goetz
brian.goetz at oracle.com
Fri May 8 19:09:38 UTC 2015
>> 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