RFR(12): JDK-8207229: Trees.getScope crashes for broken lambda; JDK-8207230: Trees.getScope runs Analyzers
vicente.romero at oracle.com
Fri Jul 13 19:47:31 UTC 2018
On 07/13/2018 12:43 PM, Jan Lahoda wrote:
> The proposed patch attempts to fix two problems with Trees.getScope:
> -a NPE when a lambda is categorized as an implicit lambda, but has a
> parameter with type (in erroneous source); when
> Attr.fallbackDescriptorType constructs the fallback descriptor, it
> uses the (unattributed) type of the parameter, which then leads to the
> NPE. The proposal is to check if the type of the parameter is present,
> and use syms.errType if not present.
> -Analyzers appear to run while the Scope is being computed by
> Trees.getScope. This does not seem necessary (as the attribution
> typically runs on a copy of the AST, not on the real AST).
> Does this look reasonable?
More information about the compiler-dev