Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332795 - [compiler][generics] import issues with inherited playedBy binding inside parameterized team
Summary: [compiler][generics] import issues with inherited playedBy binding inside par...
Status: VERIFIED FIXED
Alias: None
Product: Objectteams
Classification: Tools
Component: OTJ (show other bugs)
Version: 0.8   Edit
Hardware: Other Linux
: P3 normal (vote)
Target Milestone: 0.8 M5   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-16 16:02 EST by Stephan Herrmann CLA
Modified: 2011-01-29 13:41 EST (History)
0 users

See Also:


Attachments
test & fix (4.98 KB, patch)
2011-01-26 18:42 EST, 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 2010-12-16 16:02:36 EST
given these teams:

import pack.MyBase;
public team class SuperTeam<U> {
    protected class R playedBy MyBase {}
}

public team class SubTeam extends SuperTeam<String> {
    @Override
    protected class R {}
}

Here the compiler complains at SubTeam.R that MyBase cannot be resolved.
When adding an explicit import for MyBase
- that import is marked as unused
- the bogus error disappears
- a warning appears that MyBase should be imported using a base import
  (which in turn wouldn't work).

The problem does go away if SuperTeam uses a base import as recommended.
(SuperTeam did have a 'bindingconventions' warning in the first place).
Comment 1 Stephan Herrmann CLA 2011-01-26 18:42:32 EST
Created attachment 187701 [details]
test & fix

Apparently some alien scope type references were simply missing
a roll back after first resolve attempt failed.
Comment 2 Stephan Herrmann CLA 2011-01-26 18:44:43 EST
Patch has been committed as r1251, r1252.
Comment 3 Stephan Herrmann CLA 2011-01-29 13:41:21 EST
The main issues has been verified for 0.8M5 using build 201101290806.

Filed a FUP as bug 335774.