https://kotlinlang.org logo
#dagger
Title
# dagger
j

juliocbcotta

03/21/2019, 4:04 AM
Is it possible to provide generics types using
@IntoSet
? Like...
@IntoSet fun provideFooBar(): Foo<Bar> ...
and collect it using something like
val mySet: Set<@JvmSuppressWildcards Foo<Bar>>
?
g

gildor

03/21/2019, 4:04 AM
Yes, it’s possible
probably you should set @JvmSuppressWildcards for Bar too
j

juliocbcotta

03/21/2019, 4:05 AM
where?
Set<@JvmSuppressWildcards Foo<@JvmSuppressWildcards Bar>>
?
g

gildor

03/21/2019, 5:04 AM
something like that, I really don’t remember, but I had this case and had double wildcard
b

bdawg.io

03/24/2019, 4:01 PM
#typealiases 🙂
5 Views