effekt-lang / effekt-lang/effekt
False positive "Capture parameter count does not match () => Unit vs. () => Unit / { Foo }" when passing `box {}` to generic function
Open
area:typer
- Dominant language
- Scala
- Stars
- 469
- Forks
- 41
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 23
Description
```effekt
interface Foo {}
def bar[C](b: C) = ()
def main() = {
bar[=> Unit / Foo at {}](box{})
}
```
Note that this works:
```effekt
interface Foo {}
def bar(b: => Unit / Foo at {}) = ()
def main() = {
bar(box{})
}
```
but this doesn't:
```effekt
interface Foo {}
def bar(b: => Unit / Foo at {}) = ()
def main() = {
val a = box {}
bar(a)
}
```
The best solution would be to just make all examples compile, meaning that `=> Unit at {}` is a subtype of `=> Unit / {...} at {}`, and similarly for all functions.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.