Skip to content

Conversation

jpobst
Copy link
Contributor

@jpobst jpobst commented May 5, 2021

Fixes: #817

If we are creating an EventArgs class for a method that has a parameter array like this:

public interface SomeListener {
    void onSomeNotification (Object... args);
}

We are generating the following invalid C# code:

public partial class SomeEventArgs : global::System.EventArgs {
    params global::Java.Lang.Object[] args;

    public params global::Java.Lang.Object[] Args {
        get { return args; }
    }
}

This commit removes the extraneous params output.

@jpobst jpobst force-pushed the eventargs-params branch from 772db4d to dceb2bb Compare May 5, 2021 19:27
@jpobst jpobst marked this pull request as ready for review May 5, 2021 20:19
@jonpryor jonpryor merged commit c925b78 into main May 5, 2021
@jonpryor jonpryor deleted the eventargs-params branch May 5, 2021 22:50
@jpobst jpobst added this to the 11.4 (16.11 / 8.11) milestone May 6, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Apr 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compilation error using parameter arrays in EventArgs
2 participants