Community
Participate
Working Groups
Hey guys, The following code isn't working: package otb; public team class PrecBug { precedence after RA.RB, RA; protected team class RA playedBy A { void some() <- after void myMethod2(); private void some() { } protected class RB playedBy B { void some() <- after void myMethod2(); } } } It works if instead of class precedence callin precedence is used. The quickfix on the inner some callin binding is generating invalid code aswell. If possible it would be cool if you could backport this to the 0.7.x branch. Thanks :=) Jan Marc
I found another way to solve my problem. So backporting isn't necessary. :=)
Created attachment 186048 [details] fix under test This patch resolves the issue, but it may not be what you expected, so here's what&why: The new test test4127_precedenceDeclaration18() triggers a new error message to signal that the given code can't work: the precedence declaration tries to coordinate callins from two different teams: the binding in RA is enabled by activating team PrecBug, whereas the binding in RA.RB is enabled by activating team PrecBug.RA. Thus, precedence is determined by the order of activating these two teams, not by a precedence declaration. Here's the new error message: 'precedence' declaration can only refer to direct role classes, however PrecBug.RA.RB is a nested role of team PrecBug.RA (OTJLD 4.8).
Patch was committed as r1211, r1212 - all tests pass.
Verified for 0.8M5 using build 201101290806.
FYI: I filed bug 335777 as a FUP.
Setting iplog flag to acknowledge the contributed test case in comment 0.