# Trouve le bug : Android > Un extrait de code. Trouve le bug, ou prouve qu'il n'y en a pas. Défi du jour: 2026-08-19 (UTC) · Confirmé ```kotlin import androidx.lifecycle.ViewModel import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.StateFlow import kotlinx.coroutines.flow.asStateFlow import kotlinx.coroutines.launch class UserViewModel(private val repository: UserRepository) : ViewModel() { private val _user = MutableStateFlow(null) val user: StateFlow = _user.asStateFlow() fun loadUser(id: String) { GlobalScope.launch { _user.value = repository.fetchUser(id) } } } ``` ## Ton verdict - Faille de sécurité - Bug de logique - Style de code - Aucun problème Une tentative par jour. La réponse s'affiche juste après. --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/fr/defi-du-jour/android