Community
Participate
Working Groups
The following snippet public class TeamA { public class R playedBy A {} } gives two errors: - playedBy cannot be resolved to a type - Object Teams keyword not enabled in this scope (OTJLD A.0.1). In the hover over "playedBy" unfortunately the first useless error hides the second one. Let's try to avoid the useless error.
Created attachment 201876 [details] test & fix Fixing this by an additional check in TypeReference.reportInvalidType(..): If OT-keywords are enabled but a type reference has the same name as an OT keyword and if an error has already been reported assume this is a secondary error not worth reporting. Test is re-used from existing with more precise expectation.
Patch has been released for 2.1 M2.
Verified using build 2.2.1.201209182002