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

Region escaping errors are confusing after revamping of the type system #7655

Open
fr33m0nk opened this issue Apr 30, 2024 · 1 comment
Open

Comments

@fr33m0nk
Copy link

The region escaping errors are a bit confusing now

def main(): Unit \ {IO, rc} =
    let escaped = region rc {
        Array#{1, 2, 3} @ rc
    }; Array.forEach(println, escaped)

Error in REPL:

>> Unable to unify the effect formulas: 'IO + rc' and 'IO + rc'.

97 |     }; Array.forEach(println, escaped)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            mismatched effect formulas.

Type One: IO + rc
Type Two: IO + rc

flix> 
@mlutze
Copy link
Member

mlutze commented May 3, 2024

Part of the fix for this would be to detect shadowing of type variables.

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

2 participants