effekt-lang / effekt-lang/effekt

Check return type annotation of object operations

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

Description

Following up on #148, we should type check the return type annotation of object operations.

As of right now, we reject all return type annotations given by the user on an object operation.
Instead, we should properly check both the return type and the given set of effects.
There is some subtlety required to do this properly -- capability passing should be informed by the declared effects,
not by the user-annotated effects. See the discussion in #148 for more details.

Relevant code to be changed:
https://github.com/effekt-lang/effekt/blob/a6201f56e7c33d7674708d192e9ee39b41a2fc09/effekt/shared/src/main/scala/effekt/Typer.scala#L357-L368

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.