hey, kotlin experts i'm wondering if this is a bug...
# announcements
n
hey, kotlin experts i'm wondering if this is a bug i've defined the following:
Copy code
fun AbstractSelect.items(vararg itemId: Any) = addItems(itemId)
fun AbstractSelect.items(itemIds: Collection<Any>) = addItems(itemIds)
the problem is that the existing java class already has a class named
items
Copy code
public abstract class AbstractSelect {
    protected Container items;
    // blah blah blah
}

public class ComboBox extends AbstractSelect {
    ...
}
i'm using it like this:
Copy code
ComboBox().items("foo", "bar", "baz")
and the compiler complains:
Error:(16, 13) Kotlin: Cannot access 'items': it is protected/*protected and package*/ in 'ComboBox'