| Summary: | [compiler] toggling CCE in incremental compilation of nested phantom role | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] Objectteams | Reporter: | Stephan Herrmann <stephan.herrmann> | ||||
| Component: | OTJ | Assignee: | Stephan Herrmann <stephan.herrmann> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | major | ||||||
| Priority: | P3 | ||||||
| Version: | 0.7 | ||||||
| Target Milestone: | 0.7 M3 | ||||||
| Hardware: | Other | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 169010 [details]
test & fix
This patch contains test and fix:
- non-binary role type may still be RTB not STB, avoid the CCE by unwrapping
- do report MissingCopiedRole even for purely copied
- add severity AbortType to missingCopiedRole() to avoid continueing with
unstrengthened/weakened role type (which caused bridge methods for creators)
Patch has been committed as r341. verified for M3 using 201005282024 |
Given the following teams: public team class T1 { public team class T11 { protected class R1 { void m() {} } protected class R3 extends R1 { } } public team class T12 extends T11 { } } and public team class T2 extends T1 { public team class T12 { protected class R3 { void m() {} } } } recompiling T2 toggles between success and the following CCE: java.lang.ClassCastException: org.eclipse.objectteams.otdt.internal.core.compiler.lookup.RoleTypeBinding cannot be cast to org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding at org.eclipse.objectteams.otdt.internal.core.compiler.model.TeamModel.strengthenRoleType(TeamModel.java:688) at org.eclipse.objectteams.otdt.internal.core.compiler.model.TeamModel.strengthenRoleType(TeamModel.java:652) at org.eclipse.objectteams.otdt.internal.core.compiler.lookup.TeamAnchor.getRoleTypeBinding(TeamAnchor.java:742) at org.eclipse.objectteams.otdt.internal.core.compiler.lookup.TeamAnchor.getRoleTypeBinding(TeamAnchor.java:710) at org.eclipse.objectteams.otdt.internal.core.compiler.lookup.RoleTypeBinding.forAnchor(RoleTypeBinding.java:234) at org.eclipse.objectteams.otdt.internal.core.compiler.lookup.DependentTypeBinding.maybeInstantiate(DependentTypeBinding.java:230) at org.eclipse.objectteams.otdt.internal.core.compiler.util.RoleTypeCreator.wrapTypesInMethodBindingSignature(RoleTypeCreator.java:794) at org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveTypesFor(BinaryTypeBinding.java:1469) ...