There are several places where error recovery and related aspects could be improved, notably:
-when parsing:
---
class C {
public <T>
}
---
the "public <T>" is represented by just an ErroneousTree node, with no embedded error trees. It would be more convenient if the ErroneousTree would contain a MethodTree representing the "public <T>".
-when parsing:
"class X "
the end position of the ClassTree does not include the last space
-when parsing:
"class Test { FI fi = (s, "
the "(s," gets parsed as parethesized expression, while it apparently must be some kind of a lambda expression
-for code like:
class Test { void test() { I i = s -> { }; } interface I { public void test(String s); } }
Trees.getScope(<path-to '{ }' in s -> { }>) will return a Scope that is missing both "s" and "i".
-when parsing:
---
class C {
public <T>
}
---
the "public <T>" is represented by just an ErroneousTree node, with no embedded error trees. It would be more convenient if the ErroneousTree would contain a MethodTree representing the "public <T>".
-when parsing:
"class X "
the end position of the ClassTree does not include the last space
-when parsing:
"class Test { FI fi = (s, "
the "(s," gets parsed as parethesized expression, while it apparently must be some kind of a lambda expression
-for code like:
class Test { void test() { I i = s -> { }; } interface I { public void test(String s); } }
Trees.getScope(<path-to '{ }' in s -> { }>) will return a Scope that is missing both "s" and "i".
- relates to
-
JDK-8262095 NPE in Flow$FlowAnalyzer.visitApply: Cannot invoke getThrownTypes because tree.meth.type is null
- Resolved
-
JDK-8320948 NPE due to unreported compiler error
- Resolved
-
JDK-8235564 javac crashes while compiling incorrect method invocation with member reference
- Closed