Kotlin: Type parameter bound for T in fun <T> setAdapter(adapter : T?) : Unit where T : android.widget.ListAdapter?, T : android.widget.Filterable?
is not satisfied: inferred type ArrayAdapter<String> is not a subtype of {ListAdapter & Filterable}?
is generated by
``
val adapter = ArrayAdapter<String>(this, org.holoeverywhere.R.layout.simple_dropdown_item_1line, names)
val completion = findViewById(R.id.kayak_flight_deals_area) as AutoCompleteTextView
completion.setAdapter(adapter)
setAdapter definition is below
``
public <T extends android.widget.ListAdapter & android.widget.Filterable> void setAdapter(T adapter) { /* compiled code */ }
ArrayAdapter definition is as follow
``
public class ArrayAdapter<T> extends BaseAdapter implements Filterable
public abstract class BaseAdapter implements android.widget.ListAdapter, android.widget.SpinnerAdapter {