Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.3.3
-
None
Description
This code fails in runtime with MalformedParameterizedTypeException - run main to try it out:
class Dependency<T> { } class Something<T extends Number> { Dependency<? super T> dependency static main(String[] args) { new Something<Integer>() } }
However, it does not fail if a visibility modifier is added before dependency attribute - private, protected, public or @PackageScope transformation.
This also fails with MalformedParameterizedTypeException and I don't know how to make it work:
class Something<T extends Number> { void someMethod(Dependency<? super T> dependency) { } static main(String[] args) { new Something<Integer>() } }
Do you know what may be the cause? Do you know of any workaround for the second case?