effekt-lang / effekt-lang/effekt

Binding of type parameters in existentials

Open
#1,136 0 comments 1 reaction 0 assignees View on GitHub
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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.