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

Fix Ctr patterns not being renamed in imports #725

Merged
merged 1 commit into from
Oct 7, 2024

Conversation

developedby
Copy link
Member

Solves #724

@developedby developedby merged commit 4d6f461 into main Oct 7, 2024
5 checks passed
@developedby developedby deleted the ctr-pattern-import branch October 7, 2024 14:26
@NoamDev
Copy link

NoamDev commented Oct 7, 2024

This doesn't seem to have fixed it

@developedby
Copy link
Member Author

This doesn't seem to have fixed it

Do you have an example of where it fails? It's working for your previous example.

@NoamDev
Copy link

NoamDev commented Oct 7, 2024

Do you have an example of where it fails? It's working for your previous example.

oh, you're right, well the new case is this:

a.bend

from b import *

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

b.bend

from a import *

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 run main.bend
Errors:
In b :
In definition 'b/Foo':
  Unbound variable 'a/MyType'.
  Unbound variable 'a/MyType'.

@NoamDev
Copy link

NoamDev commented Oct 8, 2024

@developedby in case you missed this

@developedby
Copy link
Member Author

@developedby in case you missed this

I saw it, it's just that this one is a bit more complicated and doesn't seem to be a single-line fix. Sorry i forgot to uptade you here

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

Successfully merging this pull request may close these issues.

2 participants