RFR 8190939: JShell: gives a compiler error evaluating an expression of inaccessible type
Robert Field
robert.field at oracle.com
Thu Nov 16 19:08:58 UTC 2017
On 11/15/17 12:24, Jan Lahoda wrote:
> Hi Robert,
>
> Looking at:
> http://cr.openjdk.java.net/~rfield/8190939v0.webrev/src/jdk.jshell/share/classes/jdk/jshell/ExpressionToTypeInfo.java.udiff.html
>
>
> isAccessible is handling immediate recursion on types, but is not
> preventing recursion with intermediate types (as I think is noted in
> the comment). Can the recursion with intermediate types happen?
>
> Thanks,
> Jan
Thanks Jan,
Excess paranoia on my part. The concrete types of expressions are
trees. One cannot be nested within itself, directly or indirectly.
I have removed the check, simplifying the code and removed the question
(moving the valid part of the comment to the method comment).
Updated webrev:
http://cr.openjdk.java.net/~rfield/8190939v1.webrev/
Changes only the isAccessible(Type) method in:
http://cr.openjdk.java.net/~rfield/8190939v1.webrev/src/jdk.jshell/share/classes/jdk/jshell/ExpressionToTypeInfo.java.sdiff.html
-Robert
More information about the kulla-dev
mailing list