Bug 5979 - List support in generic method instantiation in binding got broken by JavaObjectExtensions.JavaCast()
Summary: List support in generic method instantiation in binding got broken by JavaObj...
Alias: None
Product: Android
Classification: Xamarin
Component: Tools and Addins (show other bugs)
Version: 4.2.x
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Atsushi Eno
Depends on:
Reported: 2012-07-04 08:13 UTC by Atsushi Eno
Modified: 2012-07-24 08:07 UTC (History)
1 user (show)

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

repro project (162.25 KB, application/zip)
2012-07-04 08:13 UTC, Atsushi Eno

Description Atsushi Eno 2012-07-04 08:13:19 UTC
Created attachment 2152 [details]
repro project

The latest binding generator fails to generate valid C# code for a method that contains a parameter of type List and resides in such a class that instantiates a parent generic class (e.g. FooAdapterView extends BaseAdapterView<BarAdapter>).

I'm attaching a failing project that exposes the issue.


	/svn/iPhoroidUI.Net/iPhoroidUI.Net/obj/Debug/generated/src/Org.Klab.Iphoroid.Widget.Listview.PullToRefreshEndlessListView.cs(359,90): error CS0311: The type `System.Collections.IList' cannot be used as type parameter `TResult' in the generic type or method `Java.Interop.JavaObjectExtensions.JavaCast<TResult>(this Android.Runtime.IJavaObject)'. There is no implicit reference conversion from `System.Collections.IList' to `Android.Runtime.IJavaObject'

etc... (ignore other errors, they either need metadata fixup or generator bugfix or generator generic enhancements)
Comment 4 Atsushi Eno 2012-07-24 08:07:56 UTC

Note You need to log in before you can comment on or make changes to this bug.