| Summary: | Invalid access by "this" to a privat static base field, results in internal compiler error. | ||
|---|---|---|---|
| Product: | [Tools] Objectteams | Reporter: | Jan Marc Hoffmann <exelnet> |
| Component: | OTJ | Assignee: | Project Inbox <objectteams.otj-inbox> |
| Status: | VERIFIED WORKSFORME | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | CC: | stephan.herrmann |
| Version: | 1.4 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
This has already been fixed in r147 (20100408). Verified for M2 using I201005052210 |
Reproduce: public class Base { private static boolean field = true; public void m(){ } } public team class SomeTeam { protected class SomeRole playedBy Base { m <-replace m; @SuppressWarnings({ "inferredcallout", "decapsulation" }) callin void m(){ boolean v = this.field; System.out.println(v); } } } Results in: Description Resource Path Location Type Internal compiler error: java.lang.ClassCastException: org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding cannot be cast to org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding at org.eclipse.jdt.internal.compiler.ast.FieldReference.manageSyntheticAccessIfNecessary(FieldReference.java:474) SomeTeam.java /otdtbugs/src/otdtbugs/inferredprivatestatic line 0 Java Problem