codelab-kotlin-coroutines icon indicating copy to clipboard operation
codelab-kotlin-coroutines copied to clipboard

fun getPlantsWithGrowZone attempts to return LiveData without a Type

Open occultus73 opened this issue 5 years ago • 0 comments
trafficstars

https://codelabs.developers.google.com/codelabs/advanced-kotlin-coroutines/#5

In part 6. code given for PlantRepository.kt

fun getPlantsWithGrowZone(growZone: GrowZone) = liveData { etc.

should be

fun getPlantsWithGrowZone(growZone: GrowZone) = liveData<List<Plant> { etc.

Perhaps the type was supposed to be inferred, but Android Studio was having none of it.

occultus73 avatar Jul 09 '20 13:07 occultus73