eclipse-jdt / eclipse-jdt/eclipse.jdt.core
java.lang.reflect.Parameter.isImplicit() doesn't capture the correct state for inner construction parameters
- Dominant language
- Java
- Stars
- 237
- Forks
- 195
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 49
Description
For example this code:
```
class Outer {
class Inner {}
}
public class X {
public static void main(String argv[]) {
for (java.lang.reflect.Constructor c : Outer.Inner.class.getDeclaredConstructors()) {
for (java.lang.reflect.Parameter p : c.getParameters()) {
System.out.println(p.isImplicit());
}
}
}
}
```
Here, we should see true as output, but get false. This is because we don't store the AccMandated on the parameter. We can force the compiler to generate it by enabling the "Store information about method parameters" option, but that shouldn't be necessary. This is very similar to https://github.com/eclipse-jdt/eclipse.jdt.core/issues/4338 but that's about the synthetic flag. I will see if I can combine both these.
Contributor guide
Assessment
This issue has not been assessed yet.