Is there some way to get rid of this horrible code...
# android
n
Is there some way to get rid of this horrible code?
Copy code
val parcelable = extras.getParcelableArray(LocationPicker.INPUT_POLYGON) as Array<Parcelable>
        for (e in parcelable) {
            inputPolygon.add(e as LatLng)
        }
I cannot find a way to make the compiler happy. Array<Parcelable> vs Array<LatLng>. Generics covariance once more