HigherOrderCO / Bend

A massively parallel, high-level programming language
https://higherorderco.com
Apache License 2.0
17.27k stars 426 forks source link

type checking does not play well with imports #722

Open NoamDev opened 3 days ago

NoamDev commented 3 days ago

Reproducing the behavior

Example: Running command: bend check main.bend With code:

a.bend

type MyType:
  A

Foo: MyType -> MyType

(Foo MyType/A) = MyType/A

main.bend

from a import *
main = "hello world"

Error.:

Errors:
In a :
In definition 'a/Foo':
  Type Error: Expected function type '(a/MyType -> a/MyType)' but found '(MyType -> a/MyType)'.

Expected behavior.... The code should check

System Settings

Example:

Additional context

No response

developedby commented 3 days ago

Likely missing a rename of imports somewhere, I'll have a look.