Ticket #144 (closed enhancement: fixed)

Opened 3 years ago

Last modified 2 years ago

Allow teams extending a non-team class

Reported by: stephan Owned by: stephan
Priority: major Milestone: OTDT_1.4.0_M3
Component: language Version: 1.2.0
Keywords: Cc:

Description (last modified by stephan) (diff)

By forcing org.objectteams.Team as the implicit super class of all teams, it is not possible for a team to inherit from any non-team class.

We might want to relax this rule by making org.objectteams.Team an interface plus moving the implementation to a new class org.objectteams.TeamImpl. If needed the compiler could just add (copy-inheritance) the required implementation into each team that cannot implicitly extend TeamImpl.

This issue came up when discussing the use of RMI for teams and roles, where extending UnicastRemoteObject is mandatory.

Change History

Changed 2 years ago by stephan

  • description modified (diff)
  • milestone set to OTDT_1.4.0

r23242 brings an initial experiment:

  • I created a new interface org.objectteams.ITeam and let org.objectteams.Team implement it.
  • Most references in generated code now use the interface rather than the class.

Reasons, why the class Team is still referenced

  • it still holds the constant ALL_THREADS
  • the compiler still treats class Team in special ways

Changed 2 years ago by stephan

The initial experiment entailed the following changes:

With these tests are basically back to working.

r23251 increments the compiler version stored in class files to support minimal compatibility checks.

Changed 2 years ago by stephan

Basic implementation is in r23257, test is X.4.1-otjld-team-extends-regular-1.

TODO:

  • more tests
  • logic to control when to generate those methods/fields and when those are correctly inherited from a super team.

Changed 2 years ago by stephan

  • milestone changed from OTDT_1.4.0 to OTDT_1.4.0_M3

OTJLD has been changed in r23262.

As of r23271 only one (unavoidable) regression remains:

Changed 2 years ago by stephan

  • status changed from new to closed
  • resolution set to fixed

As of r23272 1.2.7-otjld-non-team-superclass-1 challenges further inheritance of an affected team and even a role played by the super class of its team: by way of r23273.

Closing as fixed.

Note: See TracTickets for help on using tickets.