Skip to content

Fix Ctr patterns not being renamed in imports#725

Merged
nicolas-abril merged 1 commit intomainfrom
ctr-pattern-import
Oct 7, 2024
Merged

Fix Ctr patterns not being renamed in imports#725
nicolas-abril merged 1 commit intomainfrom
ctr-pattern-import

Conversation

@nicolas-abril
Copy link
Copy Markdown
Member

Solves #724

@nicolas-abril nicolas-abril merged commit 4d6f461 into main Oct 7, 2024
@nicolas-abril nicolas-abril deleted the ctr-pattern-import branch October 7, 2024 14:26
@NoamDev
Copy link
Copy Markdown

NoamDev commented Oct 7, 2024

This doesn't seem to have fixed it

@nicolas-abril
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown

NoamDev commented Oct 8, 2024

@developedby in case you missed this

@nicolas-abril
Copy link
Copy Markdown
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