Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 354976 - better reporting of playedBy inside plain class
Summary: better reporting of playedBy inside plain class
Status: VERIFIED FIXED
Alias: None
Product: Objectteams
Classification: Tools
Component: OTJ (show other bugs)
Version: 2.0   Edit
Hardware: Other Linux
: P3 normal (vote)
Target Milestone: 2.1 M2   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-17 11:59 EDT by Stephan Herrmann CLA
Modified: 2012-09-20 15:38 EDT (History)
0 users

See Also:


Attachments
test & fix (2.97 KB, patch)
2011-08-21 14:53 EDT, Stephan Herrmann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Herrmann CLA 2011-08-17 11:59:49 EDT
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.
Comment 1 Stephan Herrmann CLA 2011-08-21 14:53:30 EDT
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.
Comment 2 Stephan Herrmann CLA 2011-08-21 14:54:17 EDT
Patch has been released for 2.1 M2.
Comment 3 Stephan Herrmann CLA 2012-09-20 15:38:17 EDT
Verified using build 2.2.1.201209182002