effekt-lang / effekt-lang/effekt

"Could not resolve capture" caused by inconsistency in handling `def`s vs function types

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

Description

```effekt
effect Foo[C]: Unit
def bar{this: Region}: Unit / Foo[=> Unit at this] = do Foo[=> Unit at this]
val bar2: {this: Region} => Unit / Foo[=> Unit at this] at {} = box bar // Could not resolve capture this
```
Even though bar's signature can be fully typed out (as opposed to other situations, like captures to effects, where the signature is non-denotable), the type of `bar` (as shown in bar2) is non-denotable. I think this is just a `Namer` bug.

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.