Skip to content

Deprecated API element remover does the wrong thing in case of deprecated base class #3025

@rix0rrr

Description

@rix0rrr

🐛 Bug Report

Affected Languages

  • TypeScript or Javascript
  • Python
  • Java
  • .NET (C#, F#, ...)
  • Go

What is the problem?

The deprecated API element remover generates incorrect code based on the following sources:

interface ISomeInterface {
  someMethod(): void;
}

/** @deprecated */
class SomeBaseClass implements ISomeInterface {
  public someMethod() {
    console.log('some method');
  }
}


class Subclass extends SomeBaseclass {
}

What happens?

SomeBaseClass gets completely removed, but the fact that Subclass implements ISomeInterface does get propagated (as it should).

End result is that Subclass does not have an implementation for someMethod, and so in fact DOES NOT end up implementing ISomeInterface.

This definitely fails in C#... might affect other languages too. In C# the class ends up like this:

class Subclass : DeputyBase, ISomeInterface {
  // <constructors here, not interesting>
}

And we then get an error that the implementation for SomeMethod is missing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.language/dotnetRelated to .NET bindings (C#, F#, ...)module/pacmakIssues affecting the `jsii-pacmak` modulep1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions