Bug 57927 - Android Binding library generates "params fields"
Summary: Android Binding library generates "params fields"
Alias: None
Product: Android
Classification: Xamarin
Component: Bindings ()
Version: 7.3 (15.2)
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Atsushi Eno
Depends on:
Reported: 2017-07-04 12:44 UTC by patryk.romanczuk
Modified: 2017-08-21 21:30 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description patryk.romanczuk 2017-07-04 12:44:10 UTC

I'd like to report that Binding Generator in some cases generates invalid code. 
Java code:

public interface ErrorOutListener {
   void handleError(int nr, String... params);

goes into something like this:

Binding library generates class like that:
internal sealed partial class IErrorOutListenerImplementor

and it has a field:
public EventHandler<HandleErrorEventArgs> HandleErrorHandler;

But HandleErrorEventArgs can't be compiled because it ends like that:

public partial class HandleErrorEventArgs : global::System.EventArgs {

		public HandleErrorEventArgs (int p0, params  string[] p1)
			this.p0 = p0;
			this.p1 = p1;

		int p0;
		public int P0 {
			get { return p0; }

		params  string[] p1;
		public params  string[] P1 {
			get { return p1; }

Clearly, there is no such thing as params string[] p1 field. Properly it should generate field without params identifier.
Comment 1 Jon Douglas [MSFT] 2017-07-05 16:18:51 UTC
Hi Patryk,

Is it possible to get a reproduction project that demonstrates this failing generation? This will help our Android engineers get down to the real issue much faster than trying to figure out what situations this might occur. If you can please upload a sample project to this bugzilla, that would help us in CONFIRMING this issue and working on a fix to resolve it.

Thus I am marking this issue as NEEDINFO for the time being.
Comment 2 Jon Douglas [MSFT] 2017-08-21 21:30:27 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!