Community
Participate
Working Groups
Build Identifier: Hi again! If you use the following code and try to use the quickfix offered wrong code gets generated. Code: public class Base { public int method(int i) { return 0; } } public team class QueryUtilityJava { protected class MyRole playedBy Base { myCallin <- replace method; } } If the quickfix on myCallin is used it generates the following: callin void myCallin() { } Which should rather be: callin int myCallin() {} or even callin int myCallin(int i) {} The information for the generation should be available at this point. This does only apply to the replace callins of course. thanks and greetings Jan Marc Reproducible: Always
(In reply to comment #0) > Build Identifier: > > Hi again! > > If you use the following code and try to use the quickfix offered wrong code > gets generated. > > Code: > > public class Base { > public int method(int i) { > return 0; > } > } > > public team class QueryUtilityJava { > protected class MyRole playedBy Base { > myCallin <- replace method; > } > } > > If the quickfix on myCallin is used it generates the following: > > callin void myCallin() { > } > > Which should rather be: > > callin int myCallin() {} > > or even > > callin int myCallin(int i) {} > > > The information for the generation should be available at this point. > This does only apply to the replace callins of course. > > thanks and greetings > Jan Marc > > > Reproducible: Always Which should rather be: callin int myCallin() { return 0; } or even callin int myCallin(int i) { return 0; }
Good point again. Scheduling for the M4 time frame.
Created attachment 183082 [details] tests & fix This patch contains some tests and implementation which does the following: - whenever an unresolved method spec without signature is quickfixed, infer the signature from the resolved method of the other side of the method binding (callin or callout) - whenever a base method is being created but the role signature contains a role type, use the bound base type instead (lift/lower) - whenever a role method is being created and the base signature contains a base type bound to a role of the current team, prefer the role type but also propose other types (more roles bound to the same base or the base type itself) (again: lift/lower, if possible) Also contained: a CCE fix in dom, required for one of the tests.
Committed as r1026 ff.
Verified for M4 using build 201012150343