-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Open
Copy link
Labels
generatorIssues binding a Java library (generator, class-parse, etc.)Issues binding a Java library (generator, class-parse, etc.)
Description
Context: dotnet/android#5027
Given this snippet:
package com.blah;
import android.database.Cursor;
public interface MyCursor extends Cursor { }
Compiling against API-29 succeeds, while API-30 fails with:
Error CS1026: ) expected
Error CS1056: Unexpected character '`'
Error CS1002: ; expected
Error CS1002: ; expected
Error CS1513: } expected
This is due to the interface invoker method for android.database.Cursor.setNotficationUris, added in API-30, which generates this code:
var uris = (global::System.Collections.Generic.IList`1)global::Java.Lang.Object.GetObject<global::System.Collections.Generic.IList`1> (native_uris, JniHandleOwnership.DoNotTransfer);
Using a type with an arity is not legal C# (IList`1). Instead we need to generate the full closed generic type like this:
global::System.Collections.Generic.IList<global::Android.Net.Uri>
When this is fixed, this PR can be reverted: dotnet/android#5124.
awattar
Metadata
Metadata
Assignees
Labels
generatorIssues binding a Java library (generator, class-parse, etc.)Issues binding a Java library (generator, class-parse, etc.)