-
Bug
-
Resolution: Fixed
-
P3
-
None
-
Verified
Object.getClass is unique in that the type of an invocation depends on the type of the receiver expression -- it is declared to return a Class<?>, but actually returns a Class<? extends T>.
This is mentioned in JLS 4.3.2, but it is difficult to connect the dots from a method reference expression (4.3.2 only mentions a "method invocation expression").
For clarity, the return type of 'getClass' should be made explicit in 15.12.2.6.
This is mentioned in JLS 4.3.2, but it is difficult to connect the dots from a method reference expression (4.3.2 only mentions a "method invocation expression").
For clarity, the return type of 'getClass' should be made explicit in 15.12.2.6.