Skip to content

Assert matching method parameters in class-parse #1090

Closed
@jpobst

Description

@jpobst

It will hit the Debug.Assert in Methods.UpdateParametersFromMethodParametersAttribute (...):

Unexpected number of method parameters; expected 0, got 1
   at Xamarin.Android.Tools.Bytecode.MethodInfo.UpdateParametersFromMethodParametersAttribute(ParameterInfo[] parameters) in C:\code\xamarin-android\external\Java.Interop\src\Xamarin.Android.Tools.Bytecode\Methods.cs:line 305
   at Xamarin.Android.Tools.Bytecode.MethodInfo.GetParameters() in C:\code\xamarin-android\external\Java.Interop\src\Xamarin.Android.Tools.Bytecode\Methods.cs:line 92
   at Xamarin.Android.Tools.Bytecode.XmlClassDeclarationBuilder.GetMethodParameters(MethodInfo method)+MoveNext() in C:\code\xamarin-android\external\Java.Interop\src\Xamarin.Android.Tools.Bytecode\XmlClassDeclarationBuilder.cs:line 389
   at System.Xml.Linq.XContainer.AddContentSkipNotify(Object content)
   at System.Xml.Linq.XContainer.AddContentSkipNotify(Object content)
   at Xamarin.Android.Tools.Bytecode.XmlClassDeclarationBuilder.GetMethod(String element, String name, MethodInfo method, String returns) in C:\code\xamarin-android\external\Java.Interop\src\Xamarin.Android.Tools.Bytecode\XmlClassDeclarationBuilder.cs:line 338
   at Xamarin.Android.Tools.Bytecode.XmlClassDeclarationBuilder.<GetConstructors>b__23_2(MethodInfo c) in C:\code\xamarin-android\external\Java.Interop\src\Xamarin.Android.Tools.Bytecode\XmlClassDeclarationBuilder.cs:line 321
...

This works in the class-parse we ship in .NET 6 because it works today in the GooglePlayServices repository CI, so it's a regression since then.

Perhaps it was introduced in 8ccb837.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugComponent does not function as intendedgeneratorIssues binding a Java library (generator, class-parse, etc.)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions