Ticket #292 (closed enhancement: fixed)
Generic callin to generic base method
| Reported by: | stephan | Owned by: | stephan |
|---|---|---|---|
| Priority: | major | Milestone: | OTDT_1.4.0_M3 |
| Component: | language | Version: | 1.3.1 |
| Keywords: | Cc: |
Description
Currently, type parameters for callin methods are only intended for capturing covariant base method returns. This should be extended to also allow propagating base method type parameters like in
class MyBase { <T> T getIt(T it) { return it; } } team class MyTeam { protected class MyRole playedBy MyBase { callin <T> T rm(T it) { return base.rm(it); } <T> T rm(T it) <- replace <T> T getIt(T it); } }
Here the type parameters <T> of both sides of the callin binding should be identified.
This requires the following changes (otjld and compiler):
- type parameters of callin method must be discriminated into free parameters (capturing covariant return) and propagating parameters
- type parameters of role and base method specs need to be checked against each other
- rule OTJLD §4.1(a) can not be checked inspecting only the callin method but requires the callin binding, too. Thus, the mentioned paragraph must be rephrased.
- Also propagating type parameters should be mentioned in the rules.
The disabled test A.1.1-otjld_generic-feature-in-base-3ci serves as a witness.
Change History
Note: See
TracTickets for help on using
tickets.
all news
RSS feed