-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: 8
-
Component/s: specification
JLS 15.8.2 has long said that the TypeName in TypeName.class must denote a type that is accessible (§6.6) and in scope (§6.3) at the point where the class literal appears. However, the scope clause is redundant: either the TypeName is simple, in which case 6.5.5.1 already mandates an in-scope name, or the TypeName is qualified, in which case scope is irrelevant. Removing the scope clause will align with other rules that inspect a TypeName, such as 9.7.1's inspection of the TypeName in @TypeName(...).