Community
Participate
Working Groups
(originally from http://trac.objectteams.org/ot/ticket/125) Given a bound role R of TeamSuper stored in a role file, and also given a TeamSub extending TeamSuper which inherits R unmodified (i.e., TeamSub contains no declaration of R). If a base object is lifted to TeamSub.R the debugger cannot find the playedBy declaration to show what is going on.
Actually, when stepping into lifting the debugger jumps to the class header of the specific team (TeamSub), which is about as good as it can get, given that jumping to the tsuper role (in its role file) would confuse maybe even more. Note, that the stack frame in the Debug View correctly shows "TeamSub.{{Lift to R}}(Base)", which suffices to let the user know what is going on. Maybe this issue benefits from recent improvements in bug 316697. No further action is planned.
Verified for 2.0 RC1 using build 201105161939.
By trying even harder I found a constellation that indeed fails to show any source for lifting. I'll attach the project for reproduction.
Created attachment 195915 [details] project for reproduction The bug does not occur if you delete SubTeam/Role3. Even after re-adding, debugging works fine, until you do a Project>Clean. At that point lifting to Role2 indeed points into nirvana: SubTeam.{{Lift to Role2}}(Base) line: 1 Editor shows: Source not found! Indeed the SMAP contains this entry: + 1 Role2.java bug316601/teams/SubTeam/Role2.java pointing to the inexistent phantom role.
Created attachment 196277 [details] test & fix Here's the previous attachment converted into a proper unit test plus its fix. The fix is simply to exclude purely copied roles from source line mapping for liftTo methods.
Committed as r1608,9 for 2.0RC2.
Verified using build 201105311237