effekt-lang / effekt-lang/effekt

Unbox requires a boxed type, but got B.

Open
#1,224 6 comments 0 reactions 0 assignees View on GitHub
errormessage
Dominant language
Scala
Stars
469
Forks
41
Avg merge
1d 16h
Merged PRs (30d)
23

Description

The following program:

```
type Status[B] {
Done(value: Int)
More(state: B)
}

def main(): Unit = {
Done(123) match {
case Done(value) => value
case More(task) => task()
}
()
}
```

yields the error message `Unbox requires a boxed type, but got B.`.

Desired behavior is either to accept the program and infer `B` to be instantiated with `() => Int at {}`, or reject the program with an error message like "could not infer type argument for `B` in `Done(123)`".

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.