Skip to content

Mixin declaration allowing super-invocations. #7

@lrhn

Description

@lrhn

Solution for issue #6.

See the feature specification document.

Implementation issue: #12

Introduce a new syntax for declaring mixins:

mixin Mixin<TypeArgs> on SuperType1, SuperType2 implements I1, I2 {
  member-declarations
}

This declaration introduces a mixin, like one derived from a class, except that the mixin can only be applied to a super-class which implements SuperType1 and SuperType2. In return, it can then do super-invocations targeting members of the SuperType1 or SuperType2 interfaces.

Each time this mixin is applied to a super-class, it must check that all the members that are invoked by super-invocations actually have implementations in the super-class which satisfies the most specific requirement of SuperType1 and SuperType2 for that member.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureProposed language feature that solves one or more problems

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions