mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 02:54:35 +02:00
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:
parent
ec26043caf
commit
de127a784a
5 changed files with 52 additions and 12 deletions
|
@ -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 +
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue