nvm I just decided to cast to Bar<Any, Any> ...
# reflect
c
nvm I just decided to cast to Bar<Any, Any> and suppress the warning. If there is a better way to handle such a thing please do let me know
d
Foo
should be parameterized, not
Foo#addElem
.
c
If I did that then lines 27 and 28 would have an error right? Or what type would I provide
Foo<>
so that it could accept both?
d
Ah, you probably want
MutableList<Bar<out Any, out Any>>
b
Bar would have to be
Bar<in T, out R>
. You can’t declare
out
on a method parameter type