| Summary: | [compiler][generics] static role method cannot access type variable of the enclosing team | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] Objectteams | Reporter: | Stephan Herrmann <stephan.herrmann> | ||||
| Component: | OTJ | Assignee: | Stephan Herrmann <stephan.herrmann> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | ||||||
| Version: | 0.8 | ||||||
| Target Milestone: | 0.8 M4 | ||||||
| Hardware: | Other | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 184556 [details]
test & fix
Fixed by using the same strategy we already used in
Scope.getBinding(char[],int,InvocationSite,boolean)
and applying it also to internalGetTypeOrPackage()
Patch has been committed as r1132 f. Verified for M4 using build 201012150343 |
Consider this snippet: public team class MyTeam<E> { protected class R { static void test(E e) {} } } Here the compiler complains that it cannot access the non-static type E from a static context. However, in contrast to Java we support static methods in non-static member types, so staticness does not apply when looking at MyTeam.