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

Constructor patterns in pattern matching functions are not renamed when imported #724

Open
developedby opened this issue Oct 7, 2024 · 0 comments
Labels
bug Something isn't working compilation Compilation of terms and functions to HVM

Comments

@developedby
Copy link
Member

Reproducing the behavior

From @NoamDev at #722 (comment)

** a.bend **

type MyType:
A {data: u24}
B {data: u24}

Foo: MyType -> MyType

(Foo (MyType/A a)) = (MyType/A a)
(Foo (MyType/B b)) = (MyType/B b)

** main.bend**

from a import *
main = "hello world"

bend check main.bend
Errors:
In a :
In definition 'a/Foo':
Unbound constructor 'MyType/A' in pattern matching rule.
Unbound constructor 'MyType/B' in pattern matching rule.

System Settings

Bend commit 53d5262

Additional context

No response

@developedby developedby added bug Something isn't working compilation Compilation of terms and functions to HVM labels Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compilation Compilation of terms and functions to HVM
Projects
None yet
Development

No branches or pull requests

1 participant