Skip to content

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

@nicolas-abril

Description

@nicolas-abril

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcompilationCompilation of terms and functions to HVM

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions