Browse Source

fix: resolve Kotlin variance error in MLResult.kt

- Add @UnsafeVariance annotation to fix 'out' type parameter usage in input position
- Ensures compilation succeeds with the new error handling infrastructure

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
arch-002-ml-inference-engine
Quildra 5 months ago
parent
commit
6b467fb6bc
  1. 2
      app/src/main/java/com/quillstudios/pokegoalshelper/ml/MLResult.kt

2
app/src/main/java/com/quillstudios/pokegoalshelper/ml/MLResult.kt

@ -20,7 +20,7 @@ sealed class MLResult<out T>
/**
* Returns the data if successful, or the default value if error
*/
fun getOrDefault(default: T): T = when (this)
fun getOrDefault(default: @UnsafeVariance T): T = when (this)
{
is Success -> data
is Error -> default

Loading…
Cancel
Save