effekt-lang / effekt-lang/effekt
Typer failure on ambiguous type argument
Open
errormessage
- Dominant language
- Scala
- Stars
- 469
- Forks
- 41
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 23
Description
Error: Cannot fully infer type for `addError: [T, E](Result[T, E], E) => Result[T, E]`
```scala
type Result[T, E] {
Success(value: T)
Failure(errors: List[E])
}
def addError[T, E](result: Result[T, E], e: E) =
result match {
case Success(value) => Failure([e]) // also error: Cannot infer type argument T, maybe consider annotating it?
case Failure(errors) => Failure(Cons(e, errors)) // also error: Cannot infer type argument T, maybe consider annotating it?
}
```
Reproducible both on the website and on v0.25.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.