Skip to content

Clarify static checks on superinvocations in mixins: not checked at mixin application, only at run time #2625

@eernstg

Description

@eernstg

Cf. dart-lang/sdk#35111:

The specification should make it explicit that there is no type check of the bodies of mixin methods at mixin applications (in the example in the issue: the invocation of super.bar in M.test is not checked against the member signature of bar in the actual superclass B during the static analysis of MA).

In other words, we're checking once and for all that super.bar(3.14) is OK according to the member signature A.bar, and the fact that we're calling a member with a different signature in the class MA (and the call is not type correct) is only detected at run time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    specificationtechnical-debtDealing with a part of the language which needs clarification or adjustments

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions