Ticket #324 (closed enhancement: fixed)

Opened 10 months ago

Last modified 8 months ago

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.

Change History

Changed 9 months ago by stephan

  • status changed from new to accepted
  • milestone set to OTDT_1.4.0

Changed 8 months ago by stephan

  • status changed from accepted to closed
  • resolution set to fixed
  • milestone changed from OTDT_1.4.0 to OTDT_1.4.0_M3

Changed 8 months ago by stephan

More tests from r23206 are implemented in r23207:

  • signature-less callin bindings
  • binding to inherited team method
Note: See TracTickets for help on using tickets.