8143133: Wrong MethodParameters on capturing local class with multiple constructors

MethodParameters attribute not always generated for local classes constructors

Reviewed-by: jlahoda
This commit is contained in:
Maurizio Cimadamore 2015-12-14 13:55:35 +00:00
parent ec26043caf
commit de127a784a
5 changed files with 52 additions and 12 deletions

View file

@ -164,6 +164,17 @@ public class ReflectionVisitor extends Tester.Visitor {
}
}
if (p.isSynthetic() && !p.isImplicit() && !allowSynthetic) {
//patch treatment for local captures
if (isAnon || ((isLocal || isAnon) & !isStatic)) {
expect = "val\\$.*";
allowSynthetic = true;
if (isFinal) {
expect = "final val\\$.*";
}
}
}
// Check expected flags
if (p.isSynthetic() && p.isImplicit()) {
error(prefix + "param[" + i + "]='" + pname +