Skip to content
This repository was archived by the owner on Jul 6, 2026. It is now read-only.
This repository was archived by the owner on Jul 6, 2026. It is now read-only.

Bindings of abstract methods should be [Obsolete] if Java method is @Deprecated #969

Description

@jonpryor

Context: #968
Context: #968 (comment)

PR #968 "uncovered" that if you have a Java abstract method which is deprecated:

publicabstractclassExample {
@Deprecatedpublicabstractvoidm();
}

then the C# binding is not[Obsolete], and the *Invoker override is[Obsolete]:

// BindingpublicabstractpartialclassExample:Java.Lang.Object{[Register()]publicabstractvoidM();}internalpartialclassExampleInvoker:Example{[Obsolete]publicoverridevoidM()=>}

This state of affairs results in a CS0809 warning:

Error CS0809: Obsolete member 'ExampleInvoker.M()' overrides non-obsolete member 'Example.M()'

PR #968 fixed this warning for CodeGenerationTarget.JavaInterop1.

Should this also be done for CodeGenerationTarget.XAJavaInterop1?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementProposed change to current functionalitygeneratorIssues binding a Java library (generator, class-parse, etc.)

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions