effekt-lang / effekt-lang/effekt
Binding of type parameters in existentials
Open
area:parser/lexer
area:typer
- Dominant language
- Scala
- Stars
- 469
- Forks
- 41
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 23
Description
Currently the following program is accepted:
```
type Dynamic {
Wrap[A](x: A)
}
def f(d: Dynamic) = d match {
case Wrap(y) => ()
}
```
We want it to be rejected, because there is no explicit binding of the type parameter in the case arm.
Instead, we want the following program to be accepted, which is currently rejected by the parser:
```
type Dynamic {
Wrap[A](x: A)
}
def f(d: Dynamic) = d match {
case Wrap[B](y) => ()
}
```
Bottom line is that we require users to always _bind_ types explicitly.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.