-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
this code, for a very ugly API:
val ops: java.util.ArrayList[ContentProviderOperation] = new java.util.ArrayList[ContentProviderOperation]
ops.add(ContentProviderOperation.newInsert(RawContacts.CONTENT_URI)
.withValue(RawContacts.ACCOUNT_TYPE, AccountType)
.withValue(RawContacts.ACCOUNT_NAME, AccountName).build)
doesn't compile
[error] <snip>.scala:63: value ACCOUNT_TYPE is not a member of object android.provider.ContactsContract.RawContacts
[error] .withValue(RawContacts.ACCOUNT_TYPE, AccountType)
[error] ^
[error] <snip>.scala:64: value ACCOUNT_NAME is not a member of object android.provider.ContactsContract.RawContacts
[error] .withValue(RawContacts.ACCOUNT_NAME, AccountName).build)
RawContacts is a public static class which implements the SyncColumns protected static interface (among others), both defined in android.provider.ContactsContract.
RawContacts inherits those public static fields from SyncColumns, but scalac just doesn't see them.
The scaloid guy wrote a workaround but it's only a hardcoded bridge for this specific API. Note that he refers to #1086 but that seems like a different bug.