Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(jsii): compiler allows inheriting interface-violating members #3343

Merged
merged 1 commit into from Jan 18, 2022

Commits on Jan 18, 2022

  1. fix(jsii): compiler allows inheriting interface-violating members

    The compiler failed to check inherited members from a base class against
    interfaces declared on the inheriting class, so that it was possible to
    inherit members that changed the signature of the interface declarations
    they implemented (typically specializing them: required implementations
    of optional properties, etc...).
    
    While this is valid TypeScript (the implementation is allowed to be
    strictly more specific than the interface declaration), this is not
    allowed by jsii as this results in type models that cannot be
    represented in C# (and other languages that do not allow specialization
    by implementing or overriding members).
    
    In addition to fixing this issue, this change adds source bindings to
    diagnostics generated when property implementations are rejected, and
    fixes a logical error in the message for `JSII5010` (`immutable` and
    `mutable` were reversed so the message read the wrong way around).
    RomainMuller committed Jan 18, 2022
    Configuration menu
    Copy the full SHA
    4ec6531 View commit details
    Browse the repository at this point in the history