Community
Participate
Working Groups
When a nested team performs lowering/lifting for arrays of its (nested) role, both compiler and otre currently fail, mainly because lifting/lowering requires the use of an appropriate team-method, but those methods are searched for in the enclosing team, rather in the nested team itself. Although r671 already fixed an easy issue (witnessed by test2215_arrayLifting6) additional test test2215_arrayLifting7() shows more problems in this area.
Created attachment 175808 [details] fixes Various fixes as needed for test2215_arrayLifting7(): * callin-wrapper didn't find lift method because search started at the enclosing team (rather than expecting role to be a team with lift-methods, too) * array-lowering of base-call result didn't find a suitable call target, because lowering as inserted by InsertTypeAdjustmentsVisitor didn't have enough context (recall that callin wrappers are out off its scope). * insert an explicit PotentialLowerExpression * feed the appropriate team expression into the PotentialLowerExpression and from there into ArrayLowering * array-lowering in a nested team should resolve to the interface method for easier use at the call-site * OTRE adjustment for base-call surrogates (these seem to be independent of the issue of arrays): * select this or this$n * use the correct receiver type for the lifting call.
Patch has been committed as r672, r673.
r674 fixes a regression in test1129_nestedCallin2() caused by this patch: More work was needed to determine the correct receiver for array-lowering of a callin result.
Verified using I201009211735