Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 355311 - error regarding abstract method in non-abstract role may be displayed at position 0
Summary: error regarding abstract method in non-abstract role may be displayed at posi...
Status: VERIFIED FIXED
Alias: None
Product: Objectteams
Classification: Tools
Component: OTJ (show other bugs)
Version: 2.0   Edit
Hardware: Other Linux
: P3 minor (vote)
Target Milestone: 2.1 M2   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-21 07:37 EDT by Stephan Herrmann CLA
Modified: 2012-06-05 17:51 EDT (History)
0 users

See Also:


Attachments
Test & fix (2.27 KB, patch)
2011-08-21 13:09 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-21 07:37:49 EDT
If a role implicitly inherits one or more abstract methods, the error

 The abstract method foo in type Product can only be defined by an abstract class

will be displayed at position 0 of the text buffer. Since we cannot
highlight the invisible abstract method we should at least position
the error at the role class.
Comment 1 Stephan Herrmann CLA 2011-08-21 13:09:07 EDT
Created attachment 201872 [details]
Test & fix

Patch contains a test and fixes the problem by assigning valid
source positions to copied method declarations.

This should *not* affect the generated code because source positions of
a copied method are copied directly from the inherited byte code
(plus adjustment from BytecodeTransformer.mapLines(..)).
Comment 2 Stephan Herrmann CLA 2011-08-21 13:09:52 EDT
Patch has been release for 2.1M2
Comment 3 Stephan Herrmann CLA 2012-06-05 17:51:50 EDT
Verified for 2.1 using build 201206040338.