Ticket #324 (closed enhancement: fixed)
Callin bindings to team methods
| Reported by: | stephan | Owned by: | stephan |
|---|---|---|---|
| Priority: | major | Milestone: | OTDT_1.4.0_M3 |
| Component: | language | Version: | 1.4.0M1 |
| Keywords: | Cc: |
Description
The following snippet is currently illegal:
public team class MyTeam { void teamMethod() { /* do great stuff */ } protected class R playedBy B { teamMethod <- after trigger; } }
Users might, however, expect the method spec "teamMethod" to resolve to the method from the outer scope. This pattern is useful as it provides one more option of sharing: multiple roles can bind different triggers to the same shared behavior without unnecessary delegation hops.
When adding this option to the language definition, special attention has to be paid to replace bindings: callin methods are only allowed in role classes. Even more, base calls require a reference to the bound base object. As a result, the new rule would only apply to before/after callin bindings. Even if a nested team has a callin method, this method cannot be bound from a replace binding in a nested role, because that callin method would lack the base reference for issuing the base call. -- I think this limitation is OK.
all news
RSS feed