Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing type error with regions/effects #7598

Open
JonathanStarup opened this issue Apr 17, 2024 · 0 comments
Open

Confusing type error with regions/effects #7598

JonathanStarup opened this issue Apr 17, 2024 · 0 comments

Comments

@JonathanStarup
Copy link
Contributor

def example(rc: Region[r]): Int32 = {
    let _r = ref 42 @ rc;
    42
}
>> Unable to unify the effect formulas: 'r' and 'Pure'.

41 |     let _r = ref 42 @ rc;
                           ^^
                           mismatched effect formulas.

Type One: Region[r]
Type Two: Region[Pure]
@magnus-madsen magnus-madsen changed the title suboptimal type error Confusing Type Error with Regions/Effects Apr 17, 2024
@magnus-madsen magnus-madsen changed the title Confusing Type Error with Regions/Effects Confusing type error with regions/effects Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant